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

#### sitewolf

##### Active Member
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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### jasonb75

##### Well-known Member
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
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.

#### sitewolf

##### Active Member
I greatly appreciate the answers from you both!

Replies
3
Views
110
Replies
4
Views
167
Replies
1
Views
141
Replies
37
Views
1K
Replies
0
Views
336

1,148,159
Messages
5,745,116
Members
423,925
Latest member
globaltlg

### 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.

### Which adblocker are you using?

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

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