Splitting a String
This will not work as you could end up removing similar occurences of the
firstWord in the remaining portion, eg. "aa bbb aa xxx" will have an
incorrect remainder of "bbb xxx".
Regards,
Antonio Elinon
"Ron Rosenfeld" wrote:
On Sun, 12 Feb 2006 22:12:43 -0600, AMK4
wrote:
I need to split a string into two parts: the first word, and whatever's
left of the remaining string. I do this to capture the first word:
Code:
--------------------
firstWord = Left(longString, Find(" ", longString) - 1)
--------------------
... however I don't know what's the easiest (smartest?) way to figure
out the remaining part of the string.
And another method:
With your formula above in B1:
=SUBSTITUTE(longString,B1&" ","")
--ron
|