PDA

View Full Version : An If formula?



Marcster
01-12-2006, 08:05 AM
Hello People,

Is there a formula which will do this?:
Formula to be inserted into cell F2 reading content of cell E2.
If cell E2 contains a value between 0 and 30 then cell F2 should say "0 - 30"
If cell E2 contains a value between 31 and 60 then cell F2 should say "31 - 60"
If cell E2 contains a value between 61 and 90 then cell F2 should say "61 - 90"
If cell E2 contains a value between 91 and 120 then cell F2 should say "91 - 120"
If cell E2 contains a value greater than 120 then cell F2 should say "120+ "
Thanks,

Marcster.

vonpookie
01-12-2006, 08:32 AM
This seemed to work for me:

=IF(E2="","",LOOKUP(E2,{0,31,61,91,121},{"0 - 30","31 - 60","61 - 90","91 - 120","120+"}))

Marcster
01-12-2006, 09:25 AM
This seemed to work for me:

=IF(E2="","",LOOKUP(E2,{0,31,61,91,121},{"0 - 30","31 - 60","61 - 90","91 - 120","120+"}))

Works for me too :).

Thank you :thumb

Marcster.