Worksheet Name

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

How do I get the name of the current sheet (as shown on
the tab at the bottom) into a cell, the CELL function
should have that as an option but doesn't. Lotus 123 had
it 15 years ago!
 
Andy said:
How do I get the name of the current sheet (as shown on
the tab at the bottom) into a cell, the CELL function
should have that as an option but doesn't. Lotus 123 had
it 15 years ago!

Hi Andy
try the following - a little more than asked for
The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("file
name",A1),1))

File path and file name:
=CELL("filename",A1)

File path only
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)

File name only
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CEL
L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)


HTH
Frank
 
Superb thanks, that info I was after is cunningly hidden
within the filename and wht I should know that is
anyone's guess!


Andy
-----Original Message-----
Andy said:
How do I get the name of the current sheet (as shown on
the tab at the bottom) into a cell, the CELL function
should have that as an option but doesn't. Lotus 123 had
it 15 years ago!

Hi Andy
try the following - a little more than asked for
The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND ("]",CELL("file
name",A1),1))

File path and file name:
=CELL("filename",A1)

File path only
=LEFT(CELL("filename",A1),FIND("[",CELL ("filename",A1),1)-1)

File name only
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1) +1,FIND("]",CEL
L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)


HTH
Frank
 
Back
Top