Help with Formula

G

grobertson

Hi,
I'm after help with the following formula.
I have a number in Cell A1, I would like a formula in Cell A2, that will
put a number depending on what the number in Cell A1 is into Cell 2.
If the number in Cell A1 is 1 to 20 then Cell A2 should show 1
If the number is Cell A1 is 21 to 26 then Cell A2 should show 2 and
If the number is Cell A1 is 27 to 32 then Cell A2 should show 3.

Many Thanks
 
C

CLR

=IF(A1>32,"",IF(AND(A1>=27,A1<=32),3,IF(A1>=21,2,IF(A1>=1,1,""))))

Vaya con Dios,
Chuck, CABGx3
 
D

Don Guillett

Chuck,

without accounting for above 32 which I did not do, both are the same.
this accounts for >32 at ""

=IF(OR(A1>32,A1<1),"",IF(A1>26,3,IF(A1>20,2,IF(A1>0,1))))
 
Top