Formula to retrieve ws name

User avatar
VegasNath
5StarLounger
Posts: 1185
Joined: 24 Jan 2010, 12:02
Location: Wales, UK.

Formula to retrieve ws name

Post by VegasNath »

Hello,
Is there a formula that will return the name of the active worksheet?
:wales: Nathan :uk:
There's no place like home.....

User avatar
HansV
Administrator
Posts: 78549
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Formula to retrieve ws name

Post by HansV »

The following formula only works in workbooks that have been saved to disk, not in newly created workbooks that have never been saved yet:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)
Best wishes,
Hans

User avatar
VegasNath
5StarLounger
Posts: 1185
Joined: 24 Jan 2010, 12:02
Location: Wales, UK.

Re: Formula to retrieve ws name

Post by VegasNath »

Great, Thanks Hans.
:wales: Nathan :uk:
There's no place like home.....