Can I create a formula where a tab name is in a cell reference?

sitewolf

Active Member
Joined
May 4, 2012
Messages
297
I'm not sure I'm saying this coherently.
I'm creating a spread with tabs filled with data I'm creating stats from- by and large simple counts from various columns...easy peasy.
But I'd like to create a cumulative data sheet where I use tab names as a header, in other words lining each sheet's data side by side with every other sheet.

How do I use those headers in my formula to generate stats from each sheet?
i.e. instead of referencing a tab called Data with a formula looking at Data!A1, how do a pull in that A1 data with Data as the column header?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,610
Office Version
  1. 365
Platform
  1. Windows
You can do that with the INDIRECT function. Assuming header in B1,
Excel Formula:
=INDIRECT("'"&B$1&"'!A1")
Note that A1 will be absolute even though there are no $ signs. To make it relative you would either need to use R1C1 references or a more complex formula.

Also, have a read of the page linked below before using INDIRECT. There are downsides to it which are explained there.
 

Misca

Well-known Member
Joined
Aug 12, 2009
Messages
1,723
The INDIRECT function turns cell values into references:
Excel Formula:
=INDIRECT("'"&A1&"'!B5")
The example takes the sheet name from A1 and shows the value of cell B5 on that sheet.
 
Solution
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,696
Messages
5,765,972
Members
425,320
Latest member
Galin

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
Top