Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5
Default Filename without dir & sheet name

Tried =cell("filename",ref) but could not find how to remove the entire
directory and the worksheet name.

I only require the .xls filename without the sheet name.
ie. "c:\..\Template.xls[worksheet]" becomes "Template" only.

Excel help no help and searched here but nothing appeared similar.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,123
Default Filename without dir & sheet name

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

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Alchemist" wrote in message ...
Tried =cell("filename",ref) but could not find how to remove the entire
directory and the worksheet name.

I only require the .xls filename without the sheet name.
ie. "c:\..\Template.xls[worksheet]" becomes "Template" only.

Excel help no help and searched here but nothing appeared similar.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 43
Default Filename without dir & sheet name

Here's one way:

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

HTH,

Smitty

"Ron de Bruin" wrote:

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

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Alchemist" wrote in message ...
Tried =cell("filename",ref) but could not find how to remove the entire
directory and the worksheet name.

I only require the .xls filename without the sheet name.
ie. "c:\..\Template.xls[worksheet]" becomes "Template" only.

Excel help no help and searched here but nothing appeared similar.


Reply
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
Automatically printing to PDF with the filename as the sheet name Lee Crew Excel Discussion (Misc queries) 0 June 12th 07 10:54 AM
Need help, Seq numbers, Save filename & A button on sheet. Harv Excel Discussion (Misc queries) 1 May 14th 06 11:00 PM
hyperlink to sheet in formula, can't save under new filename Franky Excel Worksheet Functions 0 April 21st 06 04:20 PM
Is there an automatic display/print the filename on sheet in Exce. Geoff F Excel Discussion (Misc queries) 2 April 6th 05 12:39 PM
vlookup and filename returning same result on each sheet. RogueSwan Excel Discussion (Misc queries) 3 March 22nd 05 10:08 PM


All times are GMT +1. The time now is 01:04 AM.

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

About Us

"It's about Microsoft Excel"