Please see the attachment.
It uses user defined functions to achieve the split.
Function FirstPart(MyString) As String
Found = False
WordArray = Split(MyString, " ")
For N = 0 To UBound(WordArray)
If Found = False Then
For M = 2 To Len(WordArray(N))
If Mid(WordArray(N), M, 1) = UCase(Mid(WordArray(N), M, 1)) Then
Found = True
Exit For
End If
Next M
Else
Exit For
End If
Next N
For X = 0 To N - 2
FirstPart = FirstPart & WordArray(X) & " "
Next X
FirstPart = FirstPart & Mid(WordArray(N - 1), 1, M - 1)
End Function
Function SecondPart(MyString) As String
Found = False
WordArray = Split(MyString, " ")
For N = 0 To UBound(WordArray)
If Found = False Then
For M = 2 To Len(WordArray(N))
If Mid(WordArray(N), M, 1) = UCase(Mid(WordArray(N), M, 1)) Then
Found = True
Exit For
End If
Next M
Else
Exit For
End If
Next N
SecondPart = SecondPart & Mid(WordArray(N - 1), M) & " "
For X = N To UBound(WordArray) - 1
SecondPart = SecondPart & WordArray(X) & " "
Next X
SecondPart = SecondPart & WordArray(UBound(WordArray))
End Function
Bookmarks