Use cell value as the table array in vlookup.

jtedmonson42

New Member
Joined
Jan 22, 2017
Messages
23
So my vlookup is =IFERROR(VLOOKUP(C24,'xyz1'!B:AL,19,FALSE),"")

So I have a tab/source named xyz1. I have a cell, D1, on my main sheet where this formula is that is just =Pivot!B1 get the value of one of the filters in this case xyz1. So the cell D1 changes when i change the filters to abc1 etc etc. But when I'm changing the filters I'm also changing the data source of the table to a sheet that matches the name of the filter so xyz1 is a source tab and so is abc1.

What I want do is replace the the 'xyz1' in the formula with the value in cell D1, so that when I change the filter value on the pivot and D1 changes the lookup in the formula changes as well, so I don't have to change the formula each time I change sources.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
If you have xyz1 (or abc1, or whatever) in cell D1, substitute the expression 'xyz1'!B:AL in your formula with this: INDIRECT(D1&"!B:AL")
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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