To display the tab’s name in a cell — for a dynamic title or a reference key — pull it out of CELL("filename"), which returns the full path, workbook, and sheet. A little text surgery isolates just the sheet name.
CELL("filename") returns …[Book.xlsx]SheetName; everything after the ] is the sheet name.
The example
The formula returns whatever the tab is named — rename the tab and it updates.
| A | B | |
|---|---|---|
| 1 | Formula | Result |
| 2 | CELL("filename") | …\[Sales.xlsx]Summary |
| 3 | TEXTAFTER(…, "]") | Summary |
The formula
Just the sheet name:
How it works
Slice the sheet name out of the full path:
CELL("filename", A1)returns the full file path with the workbook in brackets and the sheet name after them —C:\…[Sales.xlsx]Summary.- The sheet name is everything after the closing bracket
]. TEXTAFTER(…, "]")grabs it directly (Excel 365). In older Excel:=MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255).- The file must be saved for
CELL("filename")to return anything — a brand-new unsaved workbook gives an empty string.
Use it as a dynamic title: ="Report for " & TEXTAFTER(CELL("filename",A1), "]") puts the tab name into a heading that updates automatically when you rename or copy the sheet.
Try it: interactive demo
CELL("filename") returns the path; the formula keeps just the tab name.
Variations
Legacy (MID/FIND)
Any version:
Get the file name
The bit between the brackets:
Full path
Everything CELL returns:
Pitfalls & errors
Empty result on an unsaved file. CELL("filename") needs the workbook saved to disk. Save once and it works.
It recalculates workbook-wide. CELL is volatile, so it refreshes on every change. Fine for a few cells, avoid in thousands.
Add the A1 argument. CELL("filename", A1) ties it to this sheet; without a reference it can report the active sheet, which may differ.
Practice workbook
Frequently asked questions
How do I get the current sheet name in a cell in Excel?
Why does my sheet-name formula return blank?
How do I get the workbook file name instead?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class