IF Statement Does Not Produce Required Results: Resulting In Zero Values In Most Conditions
May 25, 2009
I have a work sheet which includes a column of numbers representing certain daily events. I am building a user defined function to analyse the trend in the numbers by assisigning values from -2, -1, 0, 1, 2 based on comparison of two days.
Below is the function I built but it is not working, it is resulting in zero values in most conditions. I have attached the sheet which includes the numbers and the function.
View 3 Replies
ADVERTISEMENT
Nov 25, 2011
I was trying to use an if statement to produce results based on 2 cells. The number in the 1st cell can be the number 1 to 5, but each number has critera with it. Say the cell is A1 and i enter the number 1. Then i want to check the value of Cell A5, if this is less than 40 then the cell A10 should read 250 and if A5 was over 40 then it should read 285. struggled to get a formula properly to work.
Here are the values for each number: A1 = 1 with cell A5
View 7 Replies
View Related
Dec 4, 2009
If C36, C37, C38 or C39 contain a 0 then put 0 if not continue with the the formulae
I have this but I know its not right as this is a sum: =IF(C36:C39=0,0,ROUNDUP((C36/C37)+(C38/C39),0)).
View 4 Replies
View Related
Dec 1, 2008
When functions like MATCH, LOOKUP, etc are being used the result can be #N/A. An additional IF statement is required to NOT show the #N/A. The Example =if(ISERROR(match ... very long...),"",match ... very long ...) Read =IF(A is Not OK, "", A) A (very long formula) is used twice If your formula is very long the total formula even get twice as long. Is there a way to shorten this?
View 4 Replies
View Related
Sep 15, 2013
I have some data with recurring key values and differing values in the second column, I need to produce a unique list of key values with the second values concatenated together.(See below)
The data can be 10 rows to 5000 and I can have anything from 5 to 150 sheets (Separate data sets), a macro would go a long way to keeping me sane.
Sample data Required Output
A | B Z
1| 10 | a 10,a,b,c
2| 10 | b 11,a
3| 10 | c 12,a,b
4| 11 | a
5| 12 | a
6| 12 | b
My system is Windows 8 Excel 2010.
View 7 Replies
View Related
Aug 2, 2009
I'm creating an (English) football predictions competition for me and my family.
One problem that has stumped me is how to get the scores based on the 'home' & 'away' score predictions.
The rules are: If I predict the correct exact result I get 3 points. I want to add another 'rule' whereby if I predict the correct winner, I get 1 point. Incorrect predictions get 0 points. I don't know how to do this using a formula.
View 11 Replies
View Related
Jul 15, 2009
This workbook is designed to prompt the user with inputboxes allowing them to enter a name, hyperlink a file to that name, and then a date. Next all the drawing names are read into an array and stored. Along with some minor sheet formatting, this is what happens when the button "Add Drawing" is clicked.
Next, when the button "Revise Drawing" is clicked, the user will be prompted with an inputbox for a drawing name. This name will be compared to the names in the array. If the name is found, the row containing that drawing will selected and the user will be prompted to update the hyperlink, then the "drawing date" will be moved to the right by one column, then the user will be prompted for another date replacing the date that was moved. The first sequence of commands or button works fine. The button "Revise Drawing" prompts the user with the inputbox requesting the revised drawing name, then develops the runtime error 1004.
View 3 Replies
View Related
Jun 24, 2013
I have a simple spreadsheet of an inventory. Each row on this spreadsheet represents the data related to an item. I would like for a user to be able to INPUT a serial number via a userform. Then, I would like for the program to OUTPUT some information about that particular item (a few cells that should be on the same row as the serial number).
I attached an image diagram that may better represent what I am trying to do.
View 9 Replies
View Related
Jan 21, 2012
I was trying to produce a list of unique values from a much larger list. I'm using this array function -
{=IFERROR(INDEX(Sheet2!$B$2:$B$100,MATCH(0,COUNTIF($B$1:B1,Sheet2!$B$2:$B$100))), "")}
- which is marvellous and gives me exactly what I want. However my test book only has this dragged down 10 rows and already it takes 20-30 seconds to calculate. The real workbook is likely to stretch to several hundred rows, and to make matters that little more complex where I have Sheet2!$B$2:$B$100 this will relate to a completely separate book on a company network.
Is there any more efficient method of creating this list or will I just have to bear with the calculation speed?
View 4 Replies
View Related
Jun 28, 2013
I have two columns of data and would like to generate a new list showing unique combinations of those values (see attached sheet).
unique list.xls
View 9 Replies
View Related
Oct 18, 2012
I would like to find a formula that produces Names and $values in ascending order.
Example :-
Cell a1 =John Cell b1 = $70
a2 = Bill b2 = $100
a3 = Jane b3 = $25
a4 = Frank b4 = $10
a5 = Mary b5 = $60
a6 = George b6 = $30.
ANSWER to be
Frank $10......Lowest price
Jane $25
George $30
Mary $60
John $70
Bill $100.
View 6 Replies
View Related
Nov 19, 2009
I have a table of data where each row is a person, and each column is a group that person might belong to. In the intersecting cell of a person row and group column is text showing what position they hold in that group (eg Director, Head, member etc). In many cases the cell is empty because the person is not involved with the group.
There are then two lookup tables which have scores; one for the group name and one for the position type. The group name is always the column header. I have used these lookup tables as I would like the scores for each group or position to be easily adjustable.
Probably best that I just attach an example. I tried to solve this using SUMPRODUCT. VLOOKUP on the two lookup tables would have been good but it seems it doesn't work with arrays the way I expected. My attempt (which doesn't work obviously!) is given.
View 6 Replies
View Related
Jul 19, 2012
Column C5:C9999 & D5:D9999 contains alphanumerical values.
In E5:E9999 i want the result=Column C provided it matches Column D else null.
Ex:
C5=Peter ShowROOM D5=RooM E5=Peter ShowROOM
C6=Peter ShowROOM D6=r sh E6=Peter ShowROOM
C7=PeterShowROOM D7=r sh E7="" (null)
C8=PeterShowROOM D8=P E8=Peter ShowROOM
View 5 Replies
View Related
Jan 13, 2009
I have the following formula entered into cell O4: =IF((AND($K4="1",$B4="1 - C",$I4="open")),(1),(0)). When the three conditions are met in the corresponding cells, I get a "0" returned in cell O4. I would like the formula to return a "1" when all three conditions are met.
View 2 Replies
View Related
Oct 5, 2009
I am trying to create an IF statement that will double the unit value of a certain box (J15) if the number of I15 is less than or equal to 160 AND either "A,B,C, or D" is selected from a list in H15. If it does not qualify with both, it would just be the single value of J15, not doubled.
So far I can only get it to work with one item from the list in the IF statement:
=IF(AND(H15="A",I15<=160),J15*2,J15)
However, I don't know how to add in the other list options B-D and get it to work.
Basically I need these four statements combined into one:
=IF(AND(H15="A",I15<=160),J15*2,J15)
=IF(AND(H15="B",I15<=160),J15*2,J15)
=IF(AND(H15="C",I15<=160),J15*2,J15)
=IF(AND(H15="D",I15<=160),J15*2,J15)
View 4 Replies
View Related
Feb 28, 2014
I am working on a search and replace macro. It's purpose is that within a region that varies only in row size, it's suppose to compare two values, A and B. A is only placed in one cell in the region, while B is a one column range in the region.
If A <> B, A should replace all B's in the region.
These regions are placed on top of each other in a long table. Please see the sample workbook, SampleDRW.xlsm
The code I am using is this:
[Code] ......
The problem is if the B value in the next region is the same as the one before but the A value change, my code don't pick up on it, because it only looks for changing B!
How can I expand the code to also pick up on this problem?
View 7 Replies
View Related
Jan 5, 2010
In the table I've created, I have a column (column A) that contains "Y" for the first 20 rows. I'd like to use an if statement in another column (column B) to create a numbered list starting with the first row (from column A) that is blank. For example, if column A contains "Y" in the first 20 rows, I'd like starting in row 21 (in column B) to return a value of "1" and then have the subsequent rows increase in value by 1, so row 22 would be "2", row 23 would be "3" etc. The catch is, if for some reason I make a change in column, let's say extend the "Y"s down to row 25, I'd like column B to reflect those changes by starting the list in row 26.
View 3 Replies
View Related
Feb 16, 2010
I'm tring to put data in empty cells using an formula. =IF((LEFT(A4,5)),"Class",(RIGHT(A4,5)))
View 3 Replies
View Related
Jul 17, 2012
Formula I've been labouring over which is only bringing back partial results - I don't normally have much call in my role to build nested formulas...
The following is what I have so far:
=IF(AND(AQ2="MortgageSession",OR(J2="LeedsCounselling",J2="Glasgow",J2="Limavady")),
"Mortgage",IF(AND(AQ2="SelfEmployedSession",J2="LeedsCounselling"),"Mortgage","Other"))
The formula is made up of two conditions:
1.
IF AQ is 'MortgageSession'
AND
J2 is 'LeedsCounselling'
OR Glasgow
OR Limavady
I want the cell to return 'Mortgage'
2.
IF AQ is 'SelfEmployedSession'
AND
J2 is 'LeedsCounselling'
I want the cell to also return 'Mortgage'
Everything else 'Other'
I've managed to get the formula to work to a point where it will happily bring something back without error boxes, however it is only bringing back the second condition and ignoring the first - something to do with the join in between these?
View 7 Replies
View Related
Jan 17, 2007
I am trying to include two conditions into this IF statement.
=IF(ISBLANK('SHEET1'!W8),0,1)
I want to include the cell X8 in this aswell.
View 9 Replies
View Related
Jan 15, 2010
I have multiple anded conditions both Boolean and numerical. For testing purposes, I wanted to be able to switch off individual numerical conditions in the If statement. It seemed like an easy matter that I could simply comment out the And statement of choice and recompile. When I tried this, I received a compile error.
Another option would be to use individual togglebuttons to selectively turn off the 5 numerical comparisons. I have no idea how to set that up.
how to do this with either commenting or togglebuttons?
The If statement
If OptionButton4.Value = True _
And ToggleButton1.Value = True _
And Range("G3").Value >= Range("N6").Value _
And Range("AV22").Value >= Range("AU22").Value _
And Range("E3").Value = "Long" _
And Range("G3").Value Range("BG7").Value _
And Range("H4").Value >= Range("L4").Value _
And TradeFound = False And _
DeletedFound = False Then
View 9 Replies
View Related
May 2, 2006
Dim b As Long
Dim last_rowB As Long
last_rowB = Range("K65536").End(xlUp).Row
For b = last_rowB To 2 Step -1
If Sheets("Main").Cells(b, 11).Value = Sheets("Main").Cells(b + 1, 11).Value & Sheets("Main").Cells(b, 11).Value <> "" Then
Sheets("Main").Cells(b + 1, 11).EntireRow.Delete
End If
Next b
If 2 cells are the same i want to delete the row of the 2nd cell, this works. But i dont want 2 delete cells that are blank, this doesnt work. For some reason it deletes everything in the table.
View 3 Replies
View Related
Dec 28, 2007
Here is a sample of my data in the column starting at I2:
1600 (I2)
57000 (I3)
256000 (I4)
5700000 (I5)
I want to sort results so that the adjacent column gives a ranking code of "A" , "B" , "C" or "F"
my requiremetns are:
iF I2 = less than 65,500 then "A"
IF I2 = 65001 - 250000 then "B"
If I2 = 250001 - 1,000,000 then "C"
If I2 > 1,000,000 then F
The folks at "A" are above average, "B" are average, "C" below aveage with significant concerns and "F" are Critical nonformance, immediate action required.
Of course I plan to copy the formula down the range.
View 9 Replies
View Related
Aug 25, 2009
I have in column A a list of investment fund names. In columns B to D is respectively for each fund its Market Value, the Rate of Return and the Rank (1, 2, 3 or 4). I am trying to create a formula that will calculate the market value-weighted rate of return for each ranking.
For example, the 3 funds that rank first have market value weights of 10%, 12% and 13%, and rates of return of 1%, -3% and 5%. The total market-value weighted return for the top-ranked funds would therefore be 0.39% (i.e. 0.10*0.01-0.12*0.03+0.13*0.05)
The formula would first need to look in the ranking column to identify those funds with a particular rank (column D), then calculate their weights by dividing their market value by the total market value of all funds (column B), and finally multiplying these weights by the rate of return (column C), before summing the results to say, for example, that the total market-value weighted return for the top-ranked funds is 0.39%
View 5 Replies
View Related
Jul 7, 2009
I have a series of IF statements in a formula. I need one of the counters in it to start when the conditions is met.
i.e. the false section in an IF is along the lines of $B$3+J2, and then it continues down the column $B$3+J3 then $B$3+J4 etc. I need the J# to start increasing when the condition within the IF statement is met, not from the very beginning. When I get to, let's say the 13th row, when the condition is met, I want J2, not J13or14.
View 2 Replies
View Related
Dec 29, 2011
I need to add a condition to a statement that adds a "If TRUE" reference to another cell.
The other cell can be either a TEXT value "RM1" OR "TE2". If neither condition is true than the value is blank or zero.
So right now I have in the destination cell =IF(AB7="CONT",V7,"") That works lovely, but really isn't countable unless cell "Z7" ALSO has Either "RM1" OR "TE2".
If cell "Z7" has the text "DEA" or "SP" then the value of "V7" will be placed in a different column. I will use a different destination column (for this modified "DEA" or "SP" condition)
View 7 Replies
View Related
Oct 21, 2013
So, Excel reads my formula. It tells me it's correct, but it has too many statements. [I know this is true, because the equation is absolutely huge. )
The thing is, I need it to tell me, based on two separate columns - one being "State" and the other being "A vs. O", who this contact belongs to. [For each state, there is a different person for A and for O, and the entire spreadsheet is text.]
My ridiculously large, almost functional function is:
=IF(AND(RC[9]="WA",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="WA",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="MT",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="MT",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="ID",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="ID",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="OR",RC[13]="APP"),"Kyle Johnson"),IF(AND(RC[9]="OR",RC[13]="OPP"),"Tom Wieske"),IF(AND(RC[9]="CA",RC[13]="APP"),"Tom Wieske"),IF(AND(RC[9]="CA",RC[13]="OPP"),"Tony
[Code] ....
As you can clearly see, there are a lot of terms, but I need both the "State" and the "A vs. O" column to determine the outcome of the column the formula will be in.
View 3 Replies
View Related
Nov 28, 2012
I am trying to create an if statement that would check the results of a drop down menu and return a command to the user to enter certain information.
I created a drop down list, offering a list of projects 'a', 'b' or 'c'. I then created an if statement in the next cell. If user chooses project 'a' then the cell will return the project number associated with the project. The issue I am running into is that if the user chooses project 'c' in the drop down I need the cell to return a command for the user to enter the project name in the cell rather than the cell return the project number. How do I do that?
View 10 Replies
View Related
Mar 12, 2014
I have to prepare sheet 2-sales for my job and I cannot find the way to fill the price and sales results depending from the three other inputs required of the table.I belive we will need the functions addif, match, & others but still can't make it. Another tag when there is no result it needs to show "No existe producto".
View 3 Replies
View Related
Oct 26, 2008
I need to sort data similar to below using the following conditions. If the total of A's is greater than 4 they get an A. If the total of E's is greater than 4 they get an E. If they have more A's than E's, assuming they have at least 4 of each then they get an A. If the total is 5, but they don't have 4 A's then they get an E
NAME E'sA'sTOTAL
John 235 ( so this one should get E)
Mary 459 ( This one should get A)
Tim 112 (This one shouldn't get anything)
Jane 145 ( This one should have an A)
Sam 415 (This one should have an E)
I would like this to sort in one cell - I can do this over 5 cells - but not in one.
View 3 Replies
View Related