Numbers formula "can’t compare a Boolean with a number"

IF(F2<18.5,”UNDERWEIGHT”, IF(F2>25<30, “OVERWEIGHT”, IF(F2>30,”OBESE”, IF(F2<24.9>18.5,”NORMAL”))))

I don’t know what I’m doing wrong. Cell F2 is a simple Number and i want the cell to say if that number is categorized as someone underweight,overweight,obese or normal.

After I input the formula a red triangle with an exclamation mark appears and says “you can’t compre a Boolean with a number because their data types are different.”

I also don’t know if it needs space between each IF or not.


I have found the problem. I have to use IF(F2<18.5,”UNDERWEIGHT”, IF ( F2<24.9,”NORMAL”, IF (F2<29.9,”Overweight”, IF(F2>30,”OBESE”))))


You can‘t compare several values at once. So instead of

F2>25<30

use

AND(F2>25,F2<30)

(Same for the similar IF a bit later on).

So the whole line will look like

IF(F2<18.5,”UNDERWEIGHT”, IF(AND(F2>25,F2<30), “OVERWEIGHT”, IF(F2>30,”OBESE”, IF(AND(F2<24.9, F2>18.5),”NORMAL”))))