Function Problems

How to Show an Excel Worksheet Tab Name in a Cell

Chanuka GeekiyanageChanuka Geekiyanage Oct 28, 2026 871 views

Question details

The user wants to dynamically extract and display the name of the current worksheet tab inside a specific cell.

How to Show an Excel Worksheet Tab Name in a Cell
Product
Excel
Device & OS
not provided
Scenario
Creating dynamic dashboards or templates where the worksheet name needs to be visibly printed or referenced automatically within the cell data.
Observed behavior
Using a combination of the CELL, FIND, and MID functions allows the spreadsheet to pull the worksheet name from the file path.
Before you start

Ensure your workbook is saved to your computer or cloud drive first. The formula relies on retrieving the file path, which does not exist for an unsaved, brand-new workbook.

Solution 1Recommended

Extract the Sheet Name Using the CELL Function

Use a combination of CELL, FIND, and MID text functions to isolate the worksheet name from the full workbook file path.

The CELL("filename") function returns the complete file path of your workbook, with the active sheet name appended at the very end after a closing bracket. By combining this with the FIND and MID functions, you can slice off the file path and display only the worksheet tab name.

1
Save the workbook

Click 'File' and then 'Save' to save your workbook. If the file is unsaved, the CELL function will return an empty string and the formula will fail.

2
Select the target cell

Click on the specific cell where you want the worksheet tab name to be displayed.

3
Enter the extraction formula

Type the following formula exactly as written: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32) and press the Enter key.

Extract the Sheet Name Using the CELL Function
Cell Reference Advantage: Including the cell reference 'A1' in the CELL function ensures that the formula correctly identifies the specific sheet it resides in, preventing errors when recalculating across multiple tabs.
Use WPS Spreadsheet

Easily Apply Advanced Formulas with WPS Office

WPS Spreadsheet fully supports advanced text and reference functions like CELL, MID, and FIND. You can seamlessly apply this formula and manage your data with an intuitive interface that rivals Microsoft Excel.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your spreadsheet document.
  2. 2. Save the Document: Ensure the file has been saved locally so the formula can retrieve the file path.
  3. 3. Apply the Formula: Paste the =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32) formula into your desired cell and hit Enter.
100% compatible with Microsoft Excel formulas and .xlsx formatsInstantly extract worksheet names using standard text functionsLightweight application optimized for high performance with large datasetsFree to download and use with a highly familiar user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return a #VALUE! error?

This error usually occurs because the workbook has not been saved yet. Save your file to a local drive or cloud folder, and the formula will then be able to read the file path and calculate the sheet name.

Will the cell update automatically if I rename the worksheet tab?

Yes, but you may need to force a recalculation if it doesn't happen instantly. Simply press the F9 key on your keyboard to refresh the calculations, and the new tab name will appear.

Can I show a different worksheet's name instead of the current one?

Yes. Change the 'A1' cell reference in the formula to a reference on your target sheet, such as 'Sheet2!A1'. The formula will extract the name of that specific referenced sheet.

Why does the formula end with the number 32?

Excel limits worksheet tab names to a maximum of 31 characters. Telling the MID function to extract up to 32 characters ensures it comfortably captures the entire tab name without cutting off any letters.