Excel: Reference the tab name in a cell.

  • Peter Lynch
Occassionally when you are working with a lot of tabs it helps to have a reference to the tab name on the worksheet. An example might be a workbook containing financials for 100 restaurants.

To understand how this works first input the following in any worksheet.

=CELL(“filename”,A1)

This formula will retrieve the file path for your workbook. Since we are only interested in the name of the worksheet, we can modify this formula with the =MID function to retrieve only that portion of the file path.

Expand upon the previous formula with the following:

=MID(CELL(“filename”,A1),FIND(“]”,CELL(“filename”,A2))+1,255)

Note: 255 characters is the maximum length for a directory path. 

In the image below you will see that the formula in cell D18 (which is visible in cell D17) returns “Consolidated.”

Download Template