# 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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### 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
60
Replies
4
Views
117
Replies
1
Views
93
Replies
37
Views
1K
Replies
0
Views
328

1,147,498
Messages
5,741,505
Members
423,663
Latest member
kaveh87rsh

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

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