[Solved] Transposing specific number of rows in a column


Sub CopyToRange()
    Dim vDB, vR()
    Dim rngDB As Range
    Dim Cnt As Long, i As Long, j As Integer
    Dim n As Long

    Set rngDB = Range("a1", Range("a" & Rows.Count).End(xlUp))
    vDB = rngDB

    Cnt = 272

    For i = 1 To UBound(vDB, 1) Step Cnt
        n = n + 1
        ReDim Preserve vR(1 To Cnt, 1 To n)
        For j = 1 To Cnt
            If i + j - 1 > UBound(vDB, 1) Then GoTo p
            vR(j, n) = vDB(i + j - 1, 1)
        Next j
    Next i
p:
    Sheets.Add
    Range("a1").Resize(n, Cnt) = WorksheetFunction.Transpose(vR)


End Sub

2

solved Transposing specific number of rows in a column