Need Vlookup help

P

Patrick Simonds

I must be missing something when it comes to vlookup. I have the formula
below which references a cell (AZ21) on the worksheet and compares the
value in that cell to the table on the Codes worksheet. In this example
AZ21 = 6 and the returned value I am looking for is P. What I get is R. Can
someone tell me where I have gone wrong?


VLOOKUP(AZ21,Codes!$B$8:$C$21,2)

B C
8 2 R
9 12 RT
10 6 P
11 16 POT
12 40 R
13 50 R
14 51 R
15 35 R
16 60 R
17 70 0
18 78 0
19
20
21
 
B

Bob Phillips

Try using

=VLOOKUP(AZ21,Codes!$B$8:$C$21,2,False)


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
A

Alan Beban

Patrick said:
I must be missing something when it comes to vlookup. I have the formula
below which references a cell (AZ21) on the worksheet and compares the
value in that cell to the table on the Codes worksheet. In this example
AZ21 = 6 and the returned value I am looking for is P. What I get is R. Can
someone tell me where I have gone wrong?


VLOOKUP(AZ21,Codes!$B$8:$C$21,2)

B C
8 2 R
9 12 RT
10 6 P
11 16 POT
12 40 R
13 50 R
14 51 R
15 35 R
16 60 R
17 70 0
18 78 0
19
20
21

For the specific illustration you give, there's nothing wrong with the
formula (Bob Phillips suggestion won't change anything); there's
something wrong with the data you gave us. Either the table values in
Column B are not as you describe, or AZ21 has a number between 2 and 5,
inclusive, in which case the formula is returning the Column C value
corresponding to the next lower number that is included in the table.

Alan Beban
 
P

Patrick Simonds

Thank you all I discovered my error. The first row in my array was blank. As
soon as I removed the blank row, all worked well.
 

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