Excel 2020: Put the Worksheet Name in a Cell


January 29, 2020 - by

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.