The Reason:
=IF(A1>=5,"700",""),IF(A1<=6,"900",IF(A1>=9,"1000")
Test
Value if true
Value if false
This is out of place/incorrect syntax, and will always result in an error. Also, you have >'s and <'s in there, I'm not sure if that was intentional or not, but they should all go the same way (all greater than or all less than) in this type of formula. See below!
=IF(logical_test,value_if_true,value_if_false)
logical_test: This is where you put the test. The rest can be any statement that results in a True or False result, for example A1>15. If A1 is in fact larger than 15, the result will be True. Common operators would be
.
- ">" Greater Than
- "<" Less Than
- "<>" NOT equal to
- ">=" Greater than or equal to
- "<=" Less than or equal to
- "=" Equal to
value_if_true: This is the result if logical_test returns a TRUE value.
value_if_false: As you probably guessed, this is the result if logical test returns a FALSE value.
A full example of the formula would be:
=IF(A1=10,A1+10,B1)
Now, if cell A1 is equal to 10, the result of the formula will be 20. Why? Because if A1=10, the value_if_true will occur, resulting in 10+10
If A1 is NOT equal to 10, the result of the formula will be whatever the value of B1's cell is
Remember, any one of the three inputs for the IF function can be another formula, for example, here are two IF's nested:
=IF(A1=10,A1+10,IF(A1>10,A1,B1-10))
The value_if_false is another IF function, that will only be executed by Excel if the previous IF statement (A1=10) is False
And for the hell of it, since everyone is posting solutions, here is another solution using a CHOOSE function (how exotic!):
=IF(A1="","",IFERROR(CHOOSE(INT(A1),0,0,0,0,700,700,900,900,900,1000,1000,1000,1000,1000,1100,1100,1100,1100,1100,1200),1200))
I'm unique!
Bookmarks