Hi, WilliamV,
if the range is filled and I have to insert I prefer to work from the bottom up. For this example I suggested that the last line of data in K should be the start for working the way up and splitting the contents.
Sub WilliamV_RangeAndInsert()
Dim varSplit
Dim lngCounter As Long
Dim lngOffset As Long
Dim blnNewColumn As Boolean
Dim lngRC As Long
Const clngSTEP As Long = 3
Const cstrCOL As String = "K"
For lngRC = Cells(Rows.Count, cstrCOL).End(xlUp).Row To 1 Step -1
If blnNewColumn = False Then
Cells(1, cstrCOL).Offset(0, 1).EntireColumn.Insert
blnNewColumn = True
End If
With Cells(lngRC, cstrCOL)
lngOffset = 0
varSplit = Split(.Value, " ")
.Offset(1, 0).Resize(WorksheetFunction.RoundDown(UBound(varSplit) / clngSTEP, 0), 1).EntireRow.Insert
For lngCounter = LBound(varSplit) To UBound(varSplit) Step clngSTEP
With .Offset(lngOffset, 0)
.Value = varSplit(lngCounter)
.Offset(0, 1).Value = varSplit(lngCounter + 2)
lngOffset = lngOffset + 1
End With
Next lngCounter
End With
Next lngRC
With Cells(1, cstrCOL).CurrentRegion
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
End Sub
Ciao,
Holger
Bookmarks