I hate to see you not get any assistance, but your explanation of what's wanted needs a little expansion.
My gut feeling is that it's not sorting you're after, as your example data is not sorted in any manner and you don't specify any particular order to use.
I'm thinking you want the original single column
transposed into multiple rows.
Assuming it's always 3 items per row, and the item order as shown, and your data starts in A2, maybe something along the lines of this...
- Code: Select all
Sub Testing()
Dim i As Integer
Dim lr As Long
With Sheets("Sheet1")
lr = .Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lr Step 3
.Cells(i, 1).Offset(1).Resize(2, 1).Copy
.Cells(i, 2).PasteSpecial Paste:=xlPasteValues, Transpose:=True
Next i
'remove lines with col B blank
.Range("B2:B" & lr).SpecialCells(xlBlanks).EntireRow.Delete
'reposition cursor
.Range("A1").Select
'stop the marching ants
Application.CutCopyMode = False
End With
End Sub