View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_6_] Nigel[_6_] is offline
external usenet poster
 
Posts: 68
Default Stripping Path from File String

Hi Guys,
I think I am glad I asked the question! I certainly got a comprehensive
answer.

In view of the single file I am acting upon, the method might just be
academic in terms of speed, but it's good to know the alternatives.

Cheers
Nigel

"Tushar Mehta" wrote in message
news:MPG.1a9bcc83c6c4e5f09896ef@news-server...
Hi Tom,

Nice in its simplicity, is what I meant.

You got me doing some analysis (totally unwarranted given all that I
had to do yesterday <g)

For 27,800+change files,
DIR() took 2.5 seconds
Evaluate() 1.5 seconds
StrReverse(Left(Instr(StrReverse(...)))) 0.2 seconds
a custom function with a while loop to find the last occurence of the
token of interest < 0.1 seconds.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
You don't think doing a file io to get the filename is a bit slow?

Don't get me wrong, I have used Dir myself when I am lazy, but . . .





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---