I need help with an "IF" formula in excel using multiple conditions. This is what I need:
IF (cell) is <201, then *$2, if (cell) is 201-400, then *$1.15, if (cell) is >400, then *$1)
I am trying to create a "settlement" spreadsheet.
You may try this:
=IF(A1<201,"2",IF(AND(A1>201,A1<400),"1.15",1))
However, you've not mentioned what do you want to do when cell value is 201. If you want it to result in $2 then change formula to A1<=201 or else if you want it to result in $1.15 then write A1>=201 and same aplies to 400.
EDIT :
=IF(A1<=200,"2",IF(AND(A1>200,A1<=400),"1.15",1))
How many IF statements are you needing to string together? You are on the right track, they just get confusing the more you need to string together.
Related
Trying to combine two formulas together but can't figure out how to get them to work. The concatenate formula is
=IF(OR(UPPER(D6)="",UPPER(D6)="N"),A6,A6&" - "&D6)
The formula was created so that if "Y" was entered in a checkbox (yes), then it would combine two different parts to create a result in a separate box. If "N" is entered then it would not concatenate.
The formula was originally
=IF(OR((AND((A6<>""),(D6<>""))),(AND((B6<>""),(D6<>"")))),IF(A6="",B6,A6),"")
I'm trying to figure out how to put a concatenate formula somewhere in this one, haven't had any luck so far.. Thank you.
Most Excel worksheet formulas are not case sensitive, so you don't need UPPER().
Your original formula has a logic error. It can only return TRUE if A is NOT blank. But in the TRUE part, you have another IF statement that is only TRUE if A6 is blank. That situation never happens.
How complicated the formula will be depends on what the logic is. If the result should always be one thing for "n" or a blank input, and another thing for a "y" input, maybe you only need to test for "y" instead of testing for "" and "n".
=if(and(A1="y",B1="y"),X&" - "&Y,X)
If that does not answer your question, please edit your question, provide a data sample and the desired result and explain the logic. Then post a comment, so people get alerted about the update.
I'm trying to create a formula that will search a cell for the following words.. "Other" & "Repair" if either of these words are found I want it to be categorized as the word that is found. If none of these words are found I want the formula to Vlookup another column to then categorize it.
I got the formula to work for one search word, I cant figure out how to do it with two search words.
below is the formula I used for one word search criteria.
=IF(ISNUMBER(SEARCH("REPAIR",B9089)),"REPAIR",VLOOKUP(E9089,Key!$D:$E,2,0))
This is what I tried doing for the two search words but it breaks at the end for the true / flase statement
=IF(OR(ISNUMBER(SEARCH("REPAIR",B9090)),ISNUMBER(SEARCH("OTHER",B9090))),"REPAIR""OTHER",VLOOKUP(E9090,Key!$D:$E,2,0))
If you need to search for two values and the values returned, an OR statement will not work. Since it will only return true or false to an IF statement, and the IF will then return only one value. Instead, you can nest two IF statements inside each other for each of the values you need to find. Try the following formula:
=IF(ISNUMBER(SEARCH("Repair",B9089)),"Repair",IF(ISNUMBER(SEARCH("Other",B9089)),"Other",VLOOKUP(E9089,Key!$D:$E,2,0)))
(I am assuming your references and the Vlookup statement are correctly written by yourself)
I think you'll need nested IF statements, like this:
=IF(ISNUMBER(SEARCH("REPAIR",B9089)),"REPAIR", IF(ISNUMBER(SEARCH("OTHER",B9089)),"OTHER",VLOOKUP(E9089,Key!$D:$E,2,0))
What this does is first check if "REPAIR" is part of the speciified cell's value, if it isn't it checks if the cell value contains "OTHER", and if that is not the case it performs the desired VLOOKUP.
Please not that this is doable for two conditions, but if it starts getting to higher numbers you should consider writing a custom function in VBA.
I am a beginner at using Excel and I've been trying to code a particular condition. The condition is as follows,
If A<75 and B<75 then do nothing
If A>75 and B<75 then A-75
If A<75 and B>75 then B-75
If A>75 and B>75 then (A-75)+(B-75)
Here, A and B are numerical values in two different cells.
So I wrote a formula and it works when the IF statements are not nested. However when I combine the formula it gives me an error. The formula I wrote is as follows.
=IF(AND(S180<75,V180<75),0,"-",IF(AND(S180>75,V180<75),S180-75,"-",IF(AND(S180>75,V180<75),S180-75,"-",IF(AND(S180>75,V180>75),(S180-75)+(V180-75),"-"))))
The formulae that work are as follows,
=IF(AND(S180<75,V180<75),0,"-")
=IF(AND(S180>75,V180<75),S180-75,"-")
=IF(AND(S180>75,V180<75),S180-75,"-")
=IF(AND(S180>75,V180>75),(S180-75)+(V180-75),"B")
I want the conditions to all be applied in a single cell so that I can switch the resulting value into standard values from another table using the =switch function. I am using Excel Online. Any help fixing my formula is welcome.
Thanks in Advance!
With IF, but could be shortened:
=IF(AND(S180>75,V180>75),S180+V180-150,IF(AND(S180>75,V180<75),S180-75,IF(AND(S180<76,V180>75),V180-75,IF(AND(S180<75,V180<75),""))))
Do you have a recent version of Excel with the IFS function?
=ifs(AND(S180<75, V180<75), 0, AND(S180>75, V180<75), S180-75, AND(S180>75, V180<75), S180-75, AND(S180>75, V180>75), (S180-75)+(V180-75), TRUE, "B")
If you try this formula and end up with a #NAME? error then your version does not support IFS.
Try this nested IF ,
To nest IF you need to include another IF in the FALSE condition of the first IF
=IF(AND(S180<75,V180<75),0,IF(AND(S180>75,V180<75),S180-75,IF(AND(S180>75,V180<75),S180-75,IF(AND(S180>75,V180>75),(S180-75)+(V180-75),"-"))))
I've been reading a bunch of answers around nesting if/then statements in Excel but I can't figure out how to fix a "formula parse error" in mine. From what I can tell and in my code editor the formula is correct. Any ideas what I'm missing here?
I have a row of cells that auto-generate a number 1-35 based on other values. I want the cell with the formula to pull data from another row based on what's the in row of numbers 1-35. It works when I test one at a time; it's the nesting that is causing the errors. Thanks!
=IF(E$167=1,C56,IF(E$167=2,D56,IF(E$167=3,E56,IF(E$167=4,F56,IF(E$167=5,G56,IF(E$167=6,H56,IF(E$167=7,I56,IF(E$167=8,J56,IF(E$167=9,K56,IF(E$167=10,L56,IF(E$167=11,M56,IF(E$167=12,N56,IF(E$167=13,O56,IF(E$167=14,P56,IF(E$167=15,Q56,IF(E$167=16,R56,IF(E$167=17,S56,IF(E$167=18,T56,IF(E$167=19,U56,IF(E$167=20,V56,IF(E$167=21,W56,IF(E$167=22,X56,IF(E$167=23,Y56,IF(E$167=24,Z56,IF(E$167=25,AA56,IF(E$167=26,AB56,IF(E$167=27,AC56,IF(E$167=28,AD56,IF(E$167=29,AE56,IF(E$167=30,AF56,IF(E$167=31,AG56,IF(E$167=32,AH56,IF(E$167=33,AI56,IF(E$167=34,AJ56,IF(E$167=35,AK56,””)))))))))))))))))))))))))))))))))))
You might have run into a function nesting limit. Try the choose function to work around it.
How about using
=IF(AND(E167>0,E167<36),OFFSET(B56,0,E167),"")
Note : OFFSET is a volatile function, see this for details.
A simple vlookup or hlookup function can do exactly what you need without righting long nested if statement.
for example you can use:
=vlookup(E$167,$A1:$B35,2,false) where $A1:$B35 is the table array containing column A (1-35) and column B its corresponding value.
I'm looking to add some functionality to a spreadsheet that does the following.
I would like to run a Vlookup that looks for a match with another cell, if it finds a match in I20, I would like to return the value of I21. It will always have to return the value with the cell directly below it. Is there a way for me to do this?
I do not want to hard code, since the values in the vlookup maybe different, but it will always need the value directly below the match.
As I mentioned in comments, you can use
=INDEX(I:I,MATCH("something",I:I,0)+1)
Index/Match is pretty similar to Vlookup, you can read more here.
Also for error hadling you can use:
1) for Excel 2007 and later:
=IFERROR(INDEX(I:I,MATCH("something",I:I,0)+1),"there is no match")
2) for Excel 2003:
=IF(ISERROR(INDEX(I:I,MATCH("something",I:I,0)+1)),"there is no match",INDEX(I:I,MATCH("something",I:I,0)+1))