Display filename in cell

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

Guest

Hi,

I was using the ' =Cell("Filename") ' function in excel,

But I want to display only the path "= C:\Folder1\Folder2\"
And then I want to display the worksheet name = "worksheet1"

Is there a way to do this?

THanks
 
This will return the worksheet name:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

and this will return the folder:
=MID(CELL("filename",A1),1,FIND("[",CELL("filename",A1))-1)
 

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