vlookup

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a list of names in column A in this years data
Col A
15 Brian
16 Dave
17 Sam

In another spreadsheet (Old Data, March 03 Data), I have
some of the same names with other names included also in
Col A and in Col P I have %.

Col A and in Col P
5 Tim 1%
6 Sam 2%
etc

I wrote a simple vlookup that said =VLOOKUP(A15,'March
2003 Data'!$A$5:$P$42,16) and it gave me 1%. Then I copied
it down so I can find other names but does not work. What
formula should I use?

Thanks
 
Unless the names in your March 2003 data worksheet is in alphabetical order, you will get unreliable results with your formula as it stands. You need to specify that you require an exact match, so try the following:

=VLOOKUP(A15,'March 2003 Data'!$A$5:$P$42,16, FALSE)

This will return the correct percentage if the name exists, or #N/A! if it does not exist in the March 2003 Data list. If that is a problem, you can trap the error and return something more helpful like this:

=IF(ISNA(VLOOKUP(A15,'March 2003 Data'!$A$5:$P$42,16, FALSE)),"New in 2004",VLOOKUP(A15,'March 2003 Data'!$A$5:$P$42,16, FALSE))

Or you could set it to return zero or some other default percentage, or even lookup the percentage from a different table.
 
Back
Top