Assign one number to a number range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For example,
-assign 1 to any number between 50 and 64
-assign 2 to any number betwen 65 to 79
-assign 3 to any number between 80-100
So that 62 (in column 1) will be coded as a 1 (in column 2), whereas 67
would be coded a 2 and 83 would be coded a 3.
 
In cell B1 put this formula and copy down..........

=IF(OR(A1<50,A1>100),"Out of range",IF(A1>=80,3,IF(A1>=65,2,IF(A1>=50,1))))

Vaya con Dios,
Chuck, CABGx3
 
Back
Top