MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Excel "If" Statement - What is the correct Syntax?


Posted by Dianne on December 08, 2001 9:48 PM

Hi All

I used to be able to do this in Lotus, but cannot work out the syntax for the "IF" statement in excel. Can anyone please help? I need this solved by Monday Morning (i.e. 12 hours from now).

Testing value in A1

If value is less than 25 then return "0"
If value is greater than or equal to 25 but less than 50 then return "1"
If value is greater than or equal to 50, return "2".

Thanks you in anticipation.

Regards

Di


Posted by Bariloche on December 08, 2001 10:00 PM

Dianne,

This should do it:

=IF(A1<25,0,IF(A1<50,1,2))


enjoy

Posted by Dianne on December 08, 2001 10:11 PM

Hi Bariloche

Thank you so much. I can sleep tonight now.

Thanks Thanks heaps.

Di anne,