insert file name

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi,
Is there a way to program a cell to see and display the current name
of it's Excel file? Similar to the option displaying it in the header
or footer, I would like to display the file name in a cell of the
spreadsheet itself.
Any help would be appreciated.
Thanks in advance,
Mark
 
Mark

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

Sheet name>
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1),1)+1,255)

Full Address>
=CELL("filename",A1)

Bob
 
=CELL("filename")
Careful, if you don't use a cell reference on the sheet this formula
will show the path/file/sheet you were on when you last recalculated.
Also, switching back to the sheet or printing will not automatically
recalculate.
 
Excellent point!

Bob Tarburton said:
Careful, if you don't use a cell reference on the sheet this formula
will show the path/file/sheet you were on when you last recalculated.
Also, switching back to the sheet or printing will not automatically
recalculate.
 

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