Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Patrick Simonds
 
Posts: n/a
Default 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


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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




  #3   Report Post  
Alan Beban
 
Posts: n/a
Default

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
  #4   Report Post  
Patrick Simonds
 
Posts: n/a
Default

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup Syntax Error YV New Users to Excel 9 December 23rd 04 05:28 PM
Need help with modifying VLookUp Tom Excel Discussion (Misc queries) 4 December 2nd 04 12:44 AM
VLOOKUP not working Scott Excel Worksheet Functions 3 November 12th 04 08:06 PM
Using Cell references in VLookUp JonWilson631 Excel Worksheet Functions 1 November 4th 04 02:49 AM
vlookup. Amit Excel Worksheet Functions 2 November 3rd 04 12:34 PM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"