vLookup formula

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

When using the vlookup formula, it appears to be searching
correctly and locating the proper row but returns data
from the row directly above.

vlookup(a2 [y in this case] ,a1:b3,2)

a b

1 X 3
2 Y 4
3 Z 5


is returning 3 rather then the 4 expected

ang insight would be very much appriaetd
 
This works as expected for me in both XL97 and XL2002/XP.

It is a little odd, however, to have the lookup value in the first argument
be part of the table you're actually searching in the second argument. Even
when you replace A2 with the literal "Y" though, it works as expected.

Perhaps your example is a bit too simple. I'd say you should have a look at
the documentation for VLookup; in particular, note the "Table_array" (2nd
arg) and "Range_Lookup" (4th) arguments. They specify whether exact matches
are required, and further whether or not the list must be in order. This may
be causing the problem you are seeing in your real data.
--
HTH -

-Frank
Microsoft Excel MVP
Dolphin Technology Corp.
http://vbapro.com
 
Back
Top