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. |
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. |
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. |
All times are GMT +1. The time now is 08:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com