Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Smichaud
 
Posts: n/a
Default Vlookup returns incorrect match

I am using vlookup to match values on truck numbers on sheet 1 with truck
districts on sheet 2 and excel is returning the #N/A error and I can't find
the problem.
For example
On sheet 1 the truck numbers are in column C formatted as text and the truck
numbers consist of text and numbers (i.e. T1767A42)
On sheet 2 the truck numbers are in column A, sorted ascending, formatted as
text, and are the same numbers as on sheet one. (T1767A42)
Using cell d2 on sheet 1 for my vookup statement I inputted
=Vlookup(C2,sheet2!A2:C547,2,False)
If I leave the range looup as True excel returns the last entry in the
lookup coulmn which is incorrect.
If I change the range lookup to false I get the #N/A error.
Any help would be greatly appreciated.

  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
probably the values are NOT identical. Try comparing them manually with a
formula such as
=C2='sheet1'!A3
if you thionk that A3 should match your lookup value. Also check for
leading/trainling spaces, etc.


"Smichaud" wrote:

I am using vlookup to match values on truck numbers on sheet 1 with truck
districts on sheet 2 and excel is returning the #N/A error and I can't find
the problem.
For example
On sheet 1 the truck numbers are in column C formatted as text and the truck
numbers consist of text and numbers (i.e. T1767A42)
On sheet 2 the truck numbers are in column A, sorted ascending, formatted as
text, and are the same numbers as on sheet one. (T1767A42)
Using cell d2 on sheet 1 for my vookup statement I inputted
=Vlookup(C2,sheet2!A2:C547,2,False)
If I leave the range looup as True excel returns the last entry in the
lookup coulmn which is incorrect.
If I change the range lookup to false I get the #N/A error.
Any help would be greatly appreciated.

  #3   Report Post  
smichaud
 
Posts: n/a
Default

Thanks for the help, leading spaces was the problem.

"Frank Kabel" wrote:

Hi
probably the values are NOT identical. Try comparing them manually with a
formula such as
=C2='sheet1'!A3
if you thionk that A3 should match your lookup value. Also check for
leading/trainling spaces, etc.


"Smichaud" wrote:

I am using vlookup to match values on truck numbers on sheet 1 with truck
districts on sheet 2 and excel is returning the #N/A error and I can't find
the problem.
For example
On sheet 1 the truck numbers are in column C formatted as text and the truck
numbers consist of text and numbers (i.e. T1767A42)
On sheet 2 the truck numbers are in column A, sorted ascending, formatted as
text, and are the same numbers as on sheet one. (T1767A42)
Using cell d2 on sheet 1 for my vookup statement I inputted
=Vlookup(C2,sheet2!A2:C547,2,False)
If I leave the range looup as True excel returns the last entry in the
lookup coulmn which is incorrect.
If I change the range lookup to false I get the #N/A error.
Any help would be greatly appreciated.

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
How do I customize the X-axis in excel to match my dataset? cathy Charts and Charting in Excel 1 January 14th 05 01:25 AM
Vlookup with VBA Jeff Excel Discussion (Misc queries) 8 December 1st 04 02:41 PM


All times are GMT +1. The time now is 05:40 AM.

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

About Us

"It's about Microsoft Excel"