Insert file name into Cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to insert the file name into a cell, rather than on
header/footer?
 
Hi Bonny,

1996FEDT.XLS

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

D:\driveM\excel\TAXES\1996FEDT.XLS [Sheet1]
=SUBSTITUTE(SUBSTITUTE(CELL("filename",A1),"[",""),"]"," [") & "]"

for more information, worksheet examples, and coding examples for
pathname, filename, sheetname and combinations of such see
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