IF function HELP!

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

Guest

=IF(AND(B2>=11,B2<13),$I$2,if(b2>=13,b2=20),$I$3,if(b2>=21,b2<30),$I$4,"")

I am trying to nest IF formula and I'm not writing the formula correctly. I
have like 6 different ranges I want it to look at.

Help! B.
 
It looks like you want to return the value in I2 if B2 is between 11 &12, I3
id 13 to 20, I4 if 21 to 30 and blank in all other cases.
Try this:
=IF(AND(B2>=11,B2<13),$I$2,IF(AND(B2>=13,B2<=20),$I$3,IF(AND(B2>=21,B2<30),$I$4,"")))
 
look at the VLOOKUP function. It can work with ranges. List all the ranges
you want and I will show you how to use it.

Example (for the info given):

A B
1 0 =""
2 11 =I2
3 13 =I3
4 21 =I4
5 30 =""
6
7 =VLOOKUP(MAX(B7,0),A1:B5,2)

A7 will return these values:
"" for any value <11
I2 for any value >=11 and <13
I3 for any value >=13 and <21
I4 for any value >=21 and <30
"" for any value >=30.

I used B7 as the value of interest (instead of B2) in order to keep things
simple with the table placement. You can put the table anywhere, even on
another sheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top