how do i display the "path" and filename?

  • Thread starter Thread starter sokevin
  • Start date Start date
Hi
try the following:
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
 
You could add the file as a hyperlink. You'd also be able to open th
file directly from excel
 
Is this what you are looking for?

=Cell("Filename")

this will only work if the file has been saved
 
Hi dcronje!

See Frank's reply.

You *must* use a reference:

=CELL("Filename",A1)

If you don't give a reference to a cell, Excel will calculate when
another sheet is active and the formula returns the name of the active
sheet, not the sheet actually containing the formula.


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top