logo
search
Function Problems

How to Use an Excel Formula to Return the Current Worksheet Name

John WilsonJohn Wilson Oct 9, 2026 869 views

Question details

The user needs a reliable formula to automatically display the name of the active worksheet inside a cell to help create an index for large workbooks.

How to Extract and Return the Current Worksheet Name Using an Excel Formula
Product
Excel
Device & OS
not provided
Scenario
Managing large workbooks with numerous tabs where dynamically referencing sheet names is required to build automated tables of contents.
Observed behavior
The user is seeking a way to automatically extract and return the active worksheet's name directly within a cell using native functions or macros.
Before you start

Before applying the formula, you must save your workbook at least once. The native CELL function relies on the file's saved path, so it will return a blank value in unsaved, newly created files.

Solution 1Recommended

Use the Native CELL, MID, and FIND Functions

This is the most reliable native method to dynamically display the current sheet name without needing to enable macros.

This combination of formulas extracts the full file path and isolates the text that appears after the closing bracket ']' which denotes the worksheet name.

1
Save your workbook

Click 'File' and select 'Save' to save your workbook locally. The file must have a saved directory path for the formula to work.

2
Select the target cell

Click on the cell where you want the worksheet name to appear.

3
Enter the formula

Type the following formula exactly: `=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)` and press Enter. You can replace 'A1' with any cell reference on the current sheet.

Use the Native CELL, MID, and FIND Functions
Dynamic Updates: If you rename the worksheet tab later, the formula will automatically update to display the new name.
Advanced Formulas in WPS

Easily Manage Large Workbooks with WPS Spreadsheet

WPS Spreadsheet fully supports advanced text extraction formulas like CELL, MID, and FIND natively. It easily handles complex formulas and VBA macros to streamline your data management.

  1. 1. Download and Install WPS Office: Install WPS Office for free and open your spreadsheet document.
  2. 2. Save your document: Save your document to your local drive to ensure the file path is registered by the system.
  3. 3. Input the extraction formula: Type `=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)` into any cell and hit Enter to instantly reveal the sheet name.
100% compatible with Microsoft Excel formulas and file formatsFree and lightweight spreadsheet alternativeSupports VBA macros for custom indexing functionsIntuitive tab management for large workbooks
QA img-9

Frequently Asked Questions

Why does the formula return a blank result or an error?

The CELL("filename") function requires the workbook to have an established save path. If you are working in a brand-new, unsaved file, the formula will return blank. Save the file to your computer and press F9 to refresh.

Can I use this formula to get the name of a different worksheet?

Yes, you can extract the name of a different sheet by changing the cell reference inside the formula. For example, replacing A1 with Sheet2!A1 will return the name of that specific sheet instead of the active one.

Will the formula update automatically if I rename the tab?

Yes, the formula is dynamic and will reflect the new tab name. If it does not update instantly, you may need to force a calculation by pressing F9 or double-clicking the cell and hitting Enter.