Use workbook name as value

S

sebyjohn73

Hi, I am using the name of the workbook as a serial number too. I woul
like to use a formula, so that the serial # column reflects the ne
workbook name, every time I open a new workbook using the "save as
function.

regards, seb
 
G

Gord Dibben

Enter this into a cell to return the filename.

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

Note: file must have been saved a to least once.


Gord Dibben MS Excel MVP
 
S

sebyjohn73

Thank you very much

regards, Seby
Enter this into a cell to return the filename.

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

Note: file must have been saved a to least once.


Gord Dibben MS Excel MV
 

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

Top