IF(AND formula

I am using Excel 2013

I want a formula to tell put in F2 “A”, “B”, “C”, “D” based on a number in B2; the formula I tried after looking stuff up is this

=IF(AND(B2>=1,B2<=5,B2>=21,B2<=26),”A”,IF(AND(B2>=6,B2<=10,B2>=27,B2<=32),”B”,IF(AND(B2>=11,B2<=15,B2>=33,B2<=38),”C”,IF(AND(B2>=16,B2<=20,B2>=39,B2<=44),”D”))))

 

What I get back is FALSE – “39” is currently in B2 – so I need a “D”. Not sure what is wrong with formula

Here is more information

A = 1-5, 21-26

B = 6-10, 27-32

C = 11-15, 33-38

D = 16-20, 39-44

Not sure if this matters but the value in B2 will always be 2 digits, so 2 = “02”

 

Oh – also the value in B2 is also a formula, so I’m thinking I need to put in another fomula entry to indicate I need “F2” to evaluate the value in B2 not the formula…?

 

Thanks for any help

By: Travis

Leave a Reply

Your email address will not be published. Required fields are marked *