IF Formula

Bine

New member
Joined
Dec 3, 2020
Messages
12
Reaction score
0
Points
1
Excel Version(s)
Excel 2016
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!!
 
You’ll need this:

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

or something along those lines.
 
Thank you, but unfortunately it doesnt work.. I think i do something wrong ..
 
Most probably, but it's the best I can offer without seeing your sample workbook.
 
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"))
 
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)
 
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!! :) :)
 
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")))
 
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!
 
Back
Top