ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function to display file name (https://www.excelbanter.com/excel-worksheet-functions/246784-function-display-file-name.html)

Elton Law[_2_]

Function to display file name
 
Hi Expert,
Is there a function to display the file name in cell please?
Thanks
Elton

JBeaucaire[_131_]

Function to display file name
 
This formula only works after the file has been saved at least once...in any
cell:

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

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Elton Law" wrote:

Hi Expert,
Is there a function to display the file name in cell please?
Thanks
Elton


Elton Law[_2_]

Function to display file name
 
Hi Rocket Scentist,
Terrific, it works ... Thanks indeed.
Elton

"JBeaucaire" wrote:

This formula only works after the file has been saved at least once...in any
cell:

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

--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"Elton Law" wrote:

Hi Expert,
Is there a function to display the file name in cell please?
Thanks
Elton



All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com