aliaslamy2k
Active Member
- Joined
- Sep 15, 2009
- Messages
- 416
- Office Version
- 2019
- Platform
- Windows
Hello,
I would like to split the text after every space in column A to different columns. I got a vba code but works only on 1st row, I need to split the text for entire column A.
Sub NameTest()
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)
Next i
End Sub
I would like to split the text after every space in column A to different columns. I got a vba code but works only on 1st row, I need to split the text for entire column A.
Sub NameTest()
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)
Next i
End Sub