split cell on 2th and 3th space
Select the cell or cells you want to process and run the following macro...
Sub SplitOnTwoSpaces()
Dim C As Range, Parts() As String
For Each C In Selection
Parts = Split(Replace(C.Value, " ", Chr$(1), , 1), " ", 3)
Parts(0) = Replace(Parts(0), Chr$(1), " ")
C.Offset(0, 1).Resize(1, 3).Value = Parts
Next
End Sub
--
Rick (MVP - Excel)
"ppeer" wrote in message
...
Hi Expert,
I would like to split the following cell (by a routine not a worksheet
formula)
on the second and third space:
input CellA:
1044 GH Place Other information
output:
CellB CellC CellD
1044 GH Place Other Information
Please, input very welcome.
best regards,
Peter
|