Basic VLOOKUP Help

P

patd7260

I am trying vlookup and it is not quite working. I have 2 pages in the
worksheet, the first has 2 columns A and B. The second has the same
two columns A and B. I want the lookup to search for A1 on sheet 1,
find that cell on sheet 2 and return the value in column B, sheet 2.

I am using this formula:
=VLOOKUP(A2,Sheet2!A$2:A$955,1,0)

When the value returns it shows what is in column A on sheet 2 rather
than column B. If I change the 1 to a 2 it comes back with no value.

Thanks!
 
P

Pete

Your formula needs slight amendment, as follows:

=VLOOKUP(A1,Sheet2!A$2:B$955,2,0)

In your description you say you want to find a match with A1, though
your formula had A2. Also, the range needs to cover columns A and B,
and you want to return the value from column 2.

Hope this helps.

Pete
 
B

bpeltzer

=VLOOKUP(A2,Sheet2!A$2:B$955,2,0). You need the 2 in order to return data
from the 2nd column of the table. But you've got to define the table as
being two columns wide, hence the :B vs :A.
 
Top