LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Steve Mackay
 
Posts: n/a
Default filename with folder

Hi,

I need a formula that will return a file name with only the folder it is in,
not the entire file path.

For instance, if the full path of the file is:
C:\Documents and Settings\Steve\Desktop\Africa\[MyFile.xls]

I would want the formula to return:
Africa\[MyFile.xls]

I've have a formula that will return just the file name:
=MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1)

And on that returns just the path:
=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

But I can't figure out how to combine these two to get a partial path.

Thanks
Steve Mackay




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
working folder David Excel Discussion (Misc queries) 1 January 10th 05 08:52 PM
The available macros list in XL; how to suppress filename from showing KR Excel Discussion (Misc queries) 1 January 10th 05 07:20 PM
How can I change the appearance of the folder icon Margie Excel Discussion (Misc queries) 4 December 29th 04 02:41 PM
How do i save backup copy in a different folder mekraj Excel Discussion (Misc queries) 3 December 17th 04 08:33 PM
cannot save file - folder is read only BigDog Excel Discussion (Misc queries) 1 December 7th 04 11:18 PM


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"