Please repeat old solution

  • Thread starter Thread starter Elliott Alterman
  • Start date Start date
E

Elliott Alterman

I know this has been addressed before but I don't have a copy of the
solution, so please bear with me.

How do you insert (automatically) the tab name into a cell in a sheet so it
can be printed.

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

Must have been saved at least once.
 
Elliot

you could search the Google archives for "formula for sheet name"

One reply from Gord Dibben:

Steve

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

OR copy/paste this UDF to a module.

Function Mysheetname()
Application.Volatile
Mysheetname = Application.Caller.Parent.Name
End Function

in a cell enter =MySheetName()

Gord Dibben Excel MVP - XL97 SR2

Regards

Trevor
 
Back
Top