ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do i display the Filename without the path? (https://www.excelbanter.com/excel-discussion-misc-queries/113867-how-do-i-display-filename-without-path.html)

robert_manic

How do i display the Filename without the path?
 
I know you can display the full file name and path with the following formula:

=CELL("filename")

But how can you display the File name only? The path makes it so long that
the actual filename disappears off the sheet!

Ron de Bruin

How do i display the Filename without the path?
 
Hi Robert

See
http://www.xldynamic.com/source/xld.xlFAQ0002.html


--
Regards Ron de Bruin
http://www.rondebruin.nl



"robert_manic" wrote in message ...
I know you can display the full file name and path with the following formula:

=CELL("filename")

But how can you display the File name only? The path makes it so long that
the actual filename disappears off the sheet!




Ron Rosenfeld

How do i display the Filename without the path?
 
On Wed, 11 Oct 2006 09:13:02 -0700, robert_manic
wrote:

I know you can display the full file name and path with the following formula:

=CELL("filename")

But how can you display the File name only? The path makes it so long that
the actual filename disappears off the sheet!



Try this formula:

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


--ron

Bruno

How do i display the Filename without the path?
 
Did you try in View, Header and footer, User Header, 7th button from
the left? Can it be useful?

Bruno



All times are GMT +1. The time now is 02:30 PM.

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