Hi I have a Column of over 2,000 rows. Each field has a string of words (like a Sentence). I want to run a code that scrolls down the list and splits out each individual word in the string into the adjacent column.
I have attached an example with the following code.
The splitting element works and so does the range. What I can't get to work is the result being outputted next to each line.
Appreciate any help. Still learning...
Sub Testing()
Dim ShSource As Worksheet
Set ShSource = ThisWorkbook.Sheets("Sheet1")
Dim cell As Range, NamestoStandard As Range
Set NamestoStandard = ShSource.Range("A2:A10")
For Each cell In NamestoStandard
Dim txt As String
Dim i As Integer
Dim fullname As Variant
txt = cell
fullname = Split(txt, " ")
For i = 0 To UBound(fullname)
Cells(1, i + 1).Value = fullname(i)
Next i
Next cell
End Sub
Bookmarks