Vlookup table (not range)

Dancarro

Board Regular
Joined
Feb 23, 2013
Messages
65
Hi,

I am trying to do a vlookup with a table (don't get confused with the range on).

So I have two tables (not range) and I am trying to lookup a value in table2 but for some reason it doesn't work like range lookup.

Could someone help know how to reference the table in the vlookup and to specify the column.

Many thanks,
Dan
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Can you post the formula you have now please ?
And in what way exactly is it not doing what you want ?
 
Upvote 0
Hi,

The formula i am using is the normal vlookup formula:

=Vlookup([@[EmployeeID]],Table1[[#All]],Table1[Sales],FALSE)

The problem I encounter is to specify the column within Table 1
 
Upvote 0
You don't specify the column, you specify the position of the column within the range.

What you could do in this case is use MATCH to find the position of the 'Sales' column in Table1.

=Vlookup([@[EmployeeID]],Table1[[#All]],MATCH("Sales",Table1[#Headers], 0), 0)
 
Upvote 0
Hi Norie,

I tried your formula. It does give the column but the result is N/A as it doesn't match the employee ID
 
Upvote 0
Dan

It works fine for me, have you checked there's actually a match for the EmployeedID you are looking up?
 
Upvote 0
Hi Norie,

The issue is table1, where the data needs to be from the second column and not the first column.

How do I change the table array to select the columns?
 
Upvote 0
I'd suggest Index/Match at this point:

=INDEX(Table1[Sales],MATCH([@[EmployeeID]],Table1[Column 2 name here],0))

Change the blue part appropriately
 
Upvote 0

Forum statistics

Threads
1,202,990
Messages
6,052,949
Members
444,621
Latest member
MIKOLAJ_R

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top