Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to express this in an if statement.
I hope someone might be able to show me how to express the following in an IF
statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6 then "medium", if(a1 is between 7 and 10 then "high", if(a110 then "extreme", "") -- Thanks Kevin |
#2
|
|||
|
|||
One way:
If one can assume that there will be no numbers < 0, and that all numbers are integers: =LOOKUP(A1,{0,4,7,11},{"low","medium","high","extr eme"}) (otherwise, you need to specify what happens for negative numbers and non-integers, like 6.5) As an IF() statement: Strictly: =IF(AND(A1=0,A1<=3),"low",IF(AND(A1=4,A1<=6),"me dium", IF(AND(A1=7,A1<=10),"high",IF(A110,"extreme","so mething else")))) or, using the above assumptions: =IF(A1<=3,"low",IF(A1<=6,"medium",IF(A1<=10,"high" ,"extreme"))) In article , "kevin" wrote: I hope someone might be able to show me how to express the following in an IF statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6 then "medium", if(a1 is between 7 and 10 then "high", if(a110 then "extreme", "") |
#3
|
|||
|
|||
Hi Kevin,
You don't tell what it has to be if A1<0, what if it is 3.5, etc, but this may help: =IF(A1<4,"low",IF(A1<7,"medium",IF(A1<11,"high","e xtreme"))) -- Kind Regards, Niek Otten Microsoft MVP - Excel "kevin" wrote in message ... I hope someone might be able to show me how to express the following in an IF statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6 then "medium", if(a1 is between 7 and 10 then "high", if(a110 then "extreme", "") -- Thanks Kevin |
#4
|
|||
|
|||
Thanks very much for your help, works great.
"Niek Otten" wrote: Hi Kevin, You don't tell what it has to be if A1<0, what if it is 3.5, etc, but this may help: =IF(A1<4,"low",IF(A1<7,"medium",IF(A1<11,"high","e xtreme"))) -- Kind Regards, Niek Otten Microsoft MVP - Excel "kevin" wrote in message ... I hope someone might be able to show me how to express the following in an IF statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6 then "medium", if(a1 is between 7 and 10 then "high", if(a110 then "extreme", "") -- Thanks Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF Statement with Average Function results in #Value! | Excel Discussion (Misc queries) | |||
7+ nested if statement? | Excel Worksheet Functions | |||
Statement | Excel Worksheet Functions | |||
Duplicate fields does not match up! If statement | Excel Worksheet Functions | |||
IF Statement difficulty | Excel Worksheet Functions |