If statement help

Hello,

I am after a formula for the following

if a2 is less than or equal to 250 then return 1
if a2 is between 250 and 500 then return 2
if a2 is between 500 and 750 then return 3
if a2 is between 750 and 1000 then return 4
if a2 is between 1000 and 1250 then return 5
if a2 is between 1250 and 1500 then return 6
if a2 is between 1500 and 1750 then return 7
if a2 is between 1750 and 2000 then return 8
if a2 is between 2000 and 2250 then return 9
if a2 is between 2250 and 2500 then return 10

I have this so far

=IF(A2<=250,"1",IF(A2<250,A2>=500,"2"))

but the moment i add another if statement it fails.

please help.

Nested IF function

=IF(A2<251,1,IF(A2<501,2,IF(A2<751,3,IF(A2<1001,4,IF(A2<1251,5,IF(A2<1501,6,IF(A2<1751,7,IF(A2<2001,8,IF(A2<2251,9,IF(A2>2251,10,""))))))))))

You can also try this formula.

Regards,
Ferdinand

Use the AND function in

Use the AND function in conjunction with IF as follows:

=IF(A2<=250,1,IF(AND(A2>250,A2<=500),2,IF(AND(A2>500,A2<=750),3
...... continue for each of your requirements. There is a limit to the number of nested AND function's you can have in the one cell but I don't recall what that is. If you have too many for the 1 cell you may need to split over several cells and then use another formula to collate the results.

Also you do not need to use inverted comma's for numbers as you have for 1 & 2 in your example above

Regards
Mark

done

Fantastic thanks Mark I appreciate the help.