Need help with Text to Column in a macro.
Dim s As String
Dim FirstPart As String
Dim OtherParts() As String
s = "1.2.3 This is an example. That I need to break down"
FirstPart = Split(s, " ", 2)(0)
OtherParts = Split(Split(s, " ", 2)(1), ".")
FirstPart returns a single string
OtherParts returns a (zero-based) array
"Viking" wrote:
I am hoping that someone can offer help with this matter.
I have the following text that I need to break into separate columns to
get the sentences separated:
"1.2.3 This is an example. That I need to break down"
What I get when I do a texttocolumn using the "." as the separator:
"1" "2" "3" "This is an example" "That I need to
break down"
What I am trying to get is:
"1.2.3" "This is an example" "That I need to break down"
Is there someway of breaking the "1.2.3" out first?
Thanks for any help.
Troy Vincent
|