This formula will do it:
=MID(CELL("FILENAME",F10),FIND("]",CELL("FILENAME",F10))+1,255)
Some other useful ones (Please note, worked out by Julian Milano - Excl L):
To display the full title of the workbook in a cell:
=CELL("FILENAME",F10)
eg. H:\MSOffice\Macros\[Accessing document properties.xls]Sheet1
To display the Path:
=MID(CELL("FILENAME",F8), 1,FIND("[",CELL("FILENAME",F8))-1)
eg. H:\MSOffice\Macros
To display the filename:
=MID(CELL("FILENAME",F9),FIND("[",CELL("FILENAME",F9))+1,FIND("]",CELL("FILE
NAME",F9))-FIND("[",CELL("FILENAME",F9))-1)
eg. Accessing document properties.xls
To display the Sheet name:
=MID(CELL("FILENAME",F10),FIND("]",CELL("FILENAME",F10))+1,255)
eg. Sheet1
Julian Milano
------------------------
from Shane Devonshire:
-------------------------
Here is a shorter method of returning the filename to a cell:
1. Choose Insert, Name, Define and define a name MyFile to equal
=GET.DOCUMENT(88)
2. In a spreadsheet cell type =MyFile
Rgds
~Geoff~