LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Stripping Path from File String

Thanks Tom and Tushar

Yes, agreed ... using this function i/o is relatively slower
I just put it up there for a different way to do something.
Tushar, thanks for confirming this .... admittedly I don't use this method
opting for the strReverse for Xl2000+ or the loop.

cheers

Ivan

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 . . .



 
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
Concatenate path and file string for external reference Michael[_4_] Excel Worksheet Functions 5 May 21st 23 11:44 AM
Relative Path in Connection String Breunus Excel Discussion (Misc queries) 2 July 29th 09 05:10 PM
How to extract only file name from folder path string in Excel? JayKay Excel Worksheet Functions 1 March 20th 09 04:57 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
Using a variable string in a file save path Ron[_13_] Excel Programming 1 October 16th 03 08:29 PM


All times are GMT +1. The time now is 09:17 AM.

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"