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.
 
That's a good summary but it wasn't mentioned in this thread.
David Hager tried to explain it to me and I ignored it for quite
awhile until I was shown an actual demonstration. I elaborated
a bit on it to make it even more clear but one can see it at the
top of http://www.mvps.org/dmcritchie/excel/pathname.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top