Hi,
Try this... it may not be the most elegant solution but it seems to work :
Sub TransposeData()
Dim i As Long, j As Long, ar, n As Long
n = Range("A" & Rows.Count).End(xlUp).Row + 1
ReDim ar(1 To n, 1 To 1)
n = 0
For i = 1 To Range("A" & Rows.Count).End(xlUp).Row
If Cells(i, 1) <> "" Then
n = n + 1
ar(n, 1) = Cells(i, 1)
j = 2
i = i + 1
Do
ReDim Preserve ar(1 To UBound(ar, 1), 1 To UBound(ar, 2) + 1)
ar(n, j) = Cells(i, 1)
i = i + 1
j = j + 1
Loop Until Cells(i, 1) = ""
End If
Next i
Cells(1, 2).Resize(n, UBound(ar, 2)) = ar
End Sub
Bookmarks