Search code examples
excelexcel-formulaworksheet-functionworksheet

How to return the name of a Worksheet in a cell with a formula?


How can I return the name of a Worksheet, in a Cell of another Worksheet, using an Excel formula? (not using VBA)


Solution

  • Use this formula to return the name of the current sheet.

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    

    This formula can be slightly modified to return the name of any sheet in the workbook, e.g. to return "Sheet2":

    =MID(CELL("filename",Sheet2!A1),FIND("]",CELL("filename",Sheet2!A1))+1,255)
    

    Only condition: The excel spreadsheet must be saved somewhere on your computer first. (i.e. you cannot simply open a blank sheet and type in this formula before saving it - the formula will not work unless the spreadsheet is saved.)