LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dd dd is offline
external usenet poster
 
Posts: 95
Default Find length of string - firstfolder

I have a string which will contain strings of varying lengths which contain
the path to a file.
For example:
P:\firstfolder\secondfolder\thirdfolder\fourthfold er\fifthfolder\filename
The root of the path for this example is P:\firstfolder\secondfolder\
In reality the folder names are all varying lengths.

The code loops through all folders in a specific root to find a filetype.
It presently puts the path after the root in one column and the filename in
the next.
The filename column contains hyperlinks by adding the root, path and file
together.

I want the path to be split so that the third folder is put in Column A, the
remaining path is put in the Column B and the filename in Column C. I want
to alter the existing code to do this.

I want to use Mid(String,Start,Length) to find the Length of the string for
the first folder in the path after the root (thirdfolder) and before fourth
folder.

Does anyone know the syntax I should use?
Or, is there an easier alternative?

DDAwson
Scotland







 
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
Zero-Length string vs Zero (also a valid value) [email protected] Excel Worksheet Functions 2 January 24th 09 02:18 PM
Finding a string of unknown length in a string of unknown length, Help! Hankjam[_2_] Excel Discussion (Misc queries) 8 July 3rd 08 06:49 PM
String length jxbeeman Excel Discussion (Misc queries) 1 January 10th 08 07:01 PM
string length Yan Robidoux[_10_] Excel Programming 3 August 19th 04 04:13 PM
Counting string length The Wonder Thing[_3_] Excel Programming 4 August 3rd 04 09:23 PM


All times are GMT +1. The time now is 08:30 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"