How can I reference the tab name in an Excel formula?

When creating formulas in Excel, it is often necessary to reference specific tabs within a workbook. This can be achieved by using the tab name within the formula. To do so, the tab name must be enclosed in single quotation marks (‘) and followed by an exclamation mark (!). This allows the formula to access data from the specified tab. Using this technique can help streamline data analysis and organization in Excel.

Excel: Reference Tab Name in Formula


You can use the following formula in Excel to reference the current tab name (i.e. “sheet” name) in a formula:

=TEXTAFTER(CELL("filename"), "]")

This formula will return the current tab name.

For example, it may return Sheet1.

The following example shows how to use this formula in practice.

Fortunately this is easy to do using a simple formula in Excel and the following example shows how to do so.

Example: How to Reference Tab Name in Formula in Excel

Suppose we have the following Excel workbook with five sheets:

Suppose we are currently working in Sheet3 and we would like to create a formula to return the name of this current sheet.

We can type the following formula into cell A1 to do so:

=TEXTAFTER(CELL("filename"), "]")

The following screenshot shows how to use this formula in practice:

Excel reference tab name in formula

Notice that the formula returns Sheet3, which is the name of the sheet currently in use.

How This Formula Works

Recall the formula that we used to return the active sheet name:

=TEXTAFTER(CELL("filename"), "]")

This formula first uses CELL(“filename”) to extract the entire file path for the Excel workbook.

For example, if we only typed CELL(“filename”) in cell A1 then this would return the entire file path:

Next, we use the TEXTAFTER function to extract all text from this file path after the closing bracket ( ] ) in the file path.

This returns just the sheet name, which turns out to be Sheet3.

Note: You can find the complete documentation for the TEXTAFTER function in Excel .

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

x