Nested IF confusion!

J

JayPee

Help needed for this newbie ... I'm using Excel2007 btw.
This is so simple but I just don't know why I can't get it to work:

A B
10 >=50
9 >=40<50
8 >=30<40
7 >=20<30
6 >=10<20
5 >=5<10
4 >=3<4
3 >=2<3
2 >=1<2
1 >0<1
0 0

I just need to look up a value in Cell C1, compare to col B, look up its
corresponding value in col A, and put the value in D1.

I tried the nested IF work-around at http://www.cpearson.com/excel/nested.htm
but it's still not working correctly. Help?
 
P

PCLIVE

Maybe this

=LOOKUP(C1,B1:B20,A1:A20)

Sort on column B in ascending order.

HTH,
Paul
 
P

Peo Sjoblom

You cannot use those text representation of greater than equal to less than
equal to etc if that is what you do?

You would be better served if you switch order both column and row wise

0 1
1 2
2 3
3 4
10 6
20 7
30 8
40 9
50 10


then use

=IF(C1=0,0,VLOOKUP(C1,A1:B11,2))

--


Regards,


Peo Sjoblom
 
J

JayPee

I see ... thank you!!!

Peo Sjoblom said:
You cannot use those text representation of greater than equal to less than
equal to etc if that is what you do?

You would be better served if you switch order both column and row wise

0 1
1 2
2 3
3 4
10 6
20 7
30 8
40 9
50 10


then use

=IF(C1=0,0,VLOOKUP(C1,A1:B11,2))

--


Regards,


Peo Sjoblom
 

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

Top