This code will take the active cell you have highlighted and break up the string by spaces, expanding it across columns in row 1.
Example:
Cell A5 contains "Hello World Test"
Highlight cell A5
Call the sub
The code will execute and you will now have "Hello" in A1, "World" in A2, and "Test" in A3
Sub Example()
Dim txt As String
Dim i As Integer
Dim fullname As Variant
txt = ActiveCell.Value
fullname = Split(txt, " ")
For i = 0 To UBound(fullname)
Cells(1, i + 1).Value = fullname(i)
MsgBox fullname(i)
Next i
End Sub
Here is an example to get you started.
This code will take the active cell you have highlighted and break up the string by spaces, expanding it across columns in row 1.
Example:
The code will execute and you will now have "Hello" in A1, "World" in A2, and "Test" in A3