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

sitewolf

Active Member
Joined
May 4, 2012
Messages
304
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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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.
 
Upvote 0
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.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,653
Messages
6,120,749
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