MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Excel 2020: Put the Worksheet Name in a Cell


January 29, 2020 - by Bill Jelen

Excel Put the Worksheet Name in a Cell. Photo Credit: Jannes Glas at Unsplash.com

If you want each report to have the name of the worksheet as a title, use the following formula:

=TRIM(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,20)) &" Report"


The CELL() function in this case returns the full path\[File Name]SheetName. By looking for the closing square bracket, you can figure out where the sheet name occurs.

The worksheet tab says January. A formula described in the text below brings the sheet name up to cell A1 as "January Report".

Title Photo: Jannes Glas at Unsplash.com


This article is an excerpt from MrExcel 2020 - Seeing Excel Clearly.


Bill Jelen is the author / co-author of
MrExcel 2020 - Seeing Excel Clearly

This is a 4th edition of MrExcel LX. Updates for 2020 include: Ask a question about your data, XLOOKUP, Power Query's Data Profiling tools, How Geography Data Types decide which Madison, A SEQUENCE example for descending 52 weeks, Exchange Rates support in Stock Data Types, How to collapse the Search box, How to leave effective feedback for Microsoft, How to post your worksheet to the MrExcel Board using XL2BB.