Insert worksheet name

  • Thread starter Thread starter Diane
  • Start date Start date
D

Diane

Is there a way I can insert the name of the worksheet in
a cell? I see you can put it in as a header, but I would
like to see it in a cell. This is probably a really
simple thing, but I can't find how to do it!

Thanks,
D
 
Hi Diane
some formulas for that (workbook has to be saved once before they work)
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)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("file
name",A1),1))
 
Back
Top