Listing the file name of workbook in a cell?

Z

zengolfer9

Is there a way to have the name of the workbook listed in a cell an
have it auto update each time the name of the workbook changes
Everytime I update the form I change the version number (which is i
the name) but I have to update each page in the workbook, which is
pain.

Just wondering,
McDe
 
G

Gord Dibben

McDee


From a post by Chip Pearson............

Use
=CELL("filename",A1)
to get the full name, including the sheet name. E.g.,
C:\Temp\[Test.Xls]Sheet1

Use
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,LEN(CELL("filename"
,A1))-FIND("]",CELL("filename",A1)))
to get just the sheet name
Sheet1


Use
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("file
name",A1))-FIND("[",CELL("filename",A1))-1)
to get just the file name
Test.Xls

Use
=LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)))
to get full name without sheet name
C:\Temp\[Test.xls]

Use
=SUBSTITUTE(SUBSTITUTE(LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)
)),"[",""),"]","")
to get full name without sheet name, and without square brackets
C:\Temp\Test.Xls


Gord Dibben Excel MVP
 
Top