vlookup or index function that will work when column and row numbers are subject to change

jessiegeorgia

Board Regular
Joined
Aug 19, 2011
Messages
78
Hi All,

I've got a pivot table which is refreshed on a weekly basis as new data is added.
I have made a table of vlookups along the following lines;
vlookup_value refs column A
table array is the pivot table
col_index_num refers to a column number in the pivot

=VLOOKUP($A1,'Master Pivot'!$A$5:$ZZ$174,17,FALSE)

As the rows and columns in the pivot table are subject to change when the new data is added the col_index_number isn't appropriate in this instance. Is there a function I can use to accomodate this. The rows of my table are headed and can be used as a lookup ref. I've tried using INDEX but can't see how that works without using column and row num index' either,

Many thanks in advance
Jess
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Welcome to MrExcel.

You can use the MATCH function to return the column number. Example:

=VLOOKUP($A1,'Master Pivot'!$A$5:$ZZ$174,MATCH("HeaderText",'Master Pivot'!$A$5:$ZZ$5,FALSE),FALSE)

Replace HeaderText with the text that you want to find.
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,181
Members
452,893
Latest member
denay

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