Can I use the IF function to display a message

O

oilhen

I want to display a message in a cell, but I'm not sure the "IF" function
can do this?

Example:

a.. Under = <18.5
a.. Normal = 18.5-24.9
a.. Over = 25-29.9
a.. Danger = greater 30

Thanks.
 
P

Pete_UK

Assuming your value is in A1, put this in B1:

=IF(A1<18.5,"Under",IF(A1<25,"Normal",IF(A1<30,"Over","Danger")))

Hope this helps.

Pete
 
D

David Biddulph

Interesting that you've decided to exclude values between 29.9 and 30 (and
would therefore return FALSE for an input within that range), but you've
given an answer for those between 24.9 and 25. The OP, of course, should
have been clearer.
 
O

oilhen

Dear All,

It's work fine, thanks all

Oilhen

David Biddulph said:
Interesting that you've decided to exclude values between 29.9 and 30 (and
would therefore return FALSE for an input within that range), but you've
given an answer for those between 24.9 and 25. The OP, of course, should
have been clearer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top