Use =(TRIM(CLEAN(A1))) to clean up your data first. I had the same problem and this worked: Insert a column next to your search data (in your case column A). In the new column duplicate your data by typing =(TRIM(CLEAN(A1))) in the first row, then copy/paste down. This will give you a cleaned-up version of your data. Do the same for the other sheet, but your cleaned-up data should be in the first column of your range. Make sure your vlookup formula points to the cleaned-up data.
When I did this, my vlookup pulled from the correct row. It fixed my problem!
Quote:
Originally Posted by ELeigh
Hello-I am trying to use vlookup to return age, based on name. Here's what I
have:
A B
1 Jones 35
2 Smith 42
3 Charles 50
I use Vlookup (a1(from other sheet), $a$1:$bB3, 2). I can't use False
because the names are slightly different in sheets 1 and 2 (some have middle
names, nicknames, etc). The problem is that it is returning the data from one
row above instead of the correct row. i.e. if I vlookup Smith, I get the age
35.
What am I doing wrong? Thanks!
|