1. ## IF Formula

Dear all,

This is driving me crazy, i just want that my formula says e.g. "Underweight" when the value in O2 is below 18.5, "Normal" if the value is between 18.5 and 24.9:

 Underweight = <18.5 Normal weight = 18.524.9 Overweight = 2529.9 Obesity = BMI of 30 or greater Why is this not working  : =IF(O2<18.5,"Underweight",IF(18.5<=O2<=24.9,"Normal",IF(25<=O2<=29.9,"Overweight",IF(O2>30,"Obesity")))) Thank you so much for any suggestions!!  Reply With Quote

2. You’ll need this:

=IF(AND(18.5<=O2,O2<=24.9), ...

or something along those lines.  Reply With Quote

3. Thank you, but unfortunately it doesnt work.. I think i do something wrong ..  Reply With Quote

4. Most probably, but it's the best I can offer without seeing your sample workbook.  Reply With Quote

5. Originally Posted by AliGW Most probably, but it's the best I can offer without seeing your sample workbook.
Seems I am nearly there now with:
=IF(O2<18.5,"Underweight",IF(AND(18.5<=O2,O2<=24.9),"Normal",IF(AND(25<=O2,O2<=29.9),"Overweight"))) Working

Just adding the last argument like below it says there are too many arguments.. dont understand why it works with 3 ifs but not with 4 ifs:

=IF(O2<18.5, "Underweight",IF(AND(18.5<=O2,O2<=24.9),"Normal"),IF(AND(25<=O2,O2<=29.9),"Overweight"),IF(O2>30,"Obesity"))  Reply With Quote

6. Try:
Code:
`=INDEX({"Underweight";"Normal";"Overweight";"Obesity"},MATCH(O2,{0;18.5;25;30}))`
or:
Code:
`=VLOOKUP(O2,{0,"Underweight";18.5,"Normal";25,"Overweight";30,"Obesity"},2)`  Reply With Quote

7. Originally Posted by p45cal Try:
Code:
`=INDEX({"Underweight";"Normal";"Overweight";"Obesity"},MATCH(O2,{0;18.5;25;30}))`
or:
Code:
`=VLOOKUP(O2,{0,"Underweight";18.5,"Normal";25,"Overweight";30,"Obesity"},2)`

Thank you so much, the first one with the INDEX is working perfect !!! Finally!!    Reply With Quote

8. You can also do it with just simple IFs

=IF(O2<18.5,"Underweight",IF(O2<=24.9,"Normal",IF(O2<=29.9,"Overweight","Obese")))  Reply With Quote

9. Originally Posted by Bob Phillips You can also do it with just simple IFs

=IF(O2<18.5,"Underweight",IF(O2<=24.9,"Normal",IF(O2<=29.9,"Overweight","Obese")))
Great, thank you very much!  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•