Thread
:
EXTRACTING SUBSTRINGS !!
View Single Post
#
5
Posted to microsoft.public.excel.programming
Nigel[_2_]
external usenet poster
Posts: 735
EXTRACTING SUBSTRINGS !!
OK thanks for that, I thought the OP was referring to possibly the wrong
element. So he does need to uses brkout(0) as the first string.
--
Regards,
Nigel
"Rick Rothstein" wrote in message
...
I presume you are setting option base to 1 as you show B = brkout(1)
The Option Base doesn't matter... the Split function **always** returns a
zero-based array, no matter what the Option Base is set to.
--
Rick (MVP - Excel)
"Nigel" wrote in message
...
Couple of observations first. I presume you are setting option base to 1
as you show B = brkout(1)
also I presume that after the first four strings there is two ellipses
(..) otherwise the text would remain as part of the fourth string. So
try this to strip everything past those final ellipses.
leftover = Mid(A, 8 + Len(B) + Len(C) + Len(D) + Len(E))
--
Regards,
Nigel
"jay dean" wrote in message
...
Hello -
Dim A as string
Dim brkout() as string
Dim B as string, C as string, D as string, E as string, Leftover as
string
A contains text. I am trying to store the first 4 substrings of A in B,
C, D, and E. Then I want whatever else is left to be stored in Leftover.
The delimiter for the substrings is ".."
I have been able to use the SPLIT() function to store the first 4
strings using brkout=split(A,"..")
then B=brkout(1):C=brkout(2):D=brkout(3):E =brkout(4)
How do I store the remaining text left in brkout() (apart from B,C,D and
E) in Leftover?
Any help would be appreciated.
Jay
*** Sent via Developersdex
http://www.developersdex.com
***
Reply With Quote
Nigel[_2_]
View Public Profile
Find all posts by Nigel[_2_]