How can I display the name of the current worksheet in a cell?

I want to be able to display the name of the current worksheet in a cell on that worksheet.

How can I do that without resorting to VBA scripts?

If it matters, the particular flavor of Excel I'm working with is 2007, but I would prefer something as version-agnostic as possible.


=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1),1))

The workbook needs to be saved before this function works.

The key to the function is =CELL("filename",A1), which returns a handy string that includes the file path, the file name, and the worksheet name: C:\Users\john.smith\Desktop\[Test.xlsx]Sheet1

See:

  • http://www.mcgimpsey.com/excel/formulae/cell_function.html
  • http://www.excelforum.com/excel-formulas-and-functions/399701-how-to-get-the-name-of-the-sheet-in-a-cell.html