![]() |
Need Vlookup help
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 |
Try using
=VLOOKUP(AZ21,Codes!$B$8:$C$21,2,False) -- HTH RP (remove nothere from the email address if mailing direct) "Patrick Simonds" wrote in message ... 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 |
Patrick Simonds wrote:
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 |
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. "Alan Beban" wrote in message ... Patrick Simonds wrote: 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 |
All times are GMT +1. The time now is 04:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com