View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Smitty Smitty is offline
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.