I would dimention the array like
ReDim myArray(1 to Rows.count, 1 To 5)
So that you don't need to transpose.
If the result reaches to the limit, print the result to the sheet and ReDim (empty the array) and do the same thing again.
My small PC is capable to do this.
e.g
Sub test()
Dim a, i As Long, ii As Long, n As Long, t As Long
ReDim a(1 To Rows.Count, 1 To 5)
t = 1
For i = 1 To UBound(a, 1) * 2
n = n + 1
For ii = 1 To UBound(a, 2)
a(n, ii) = Rnd
Next
If n = UBound(a, 1) Then
Cells(1, t).Resize(n, UBound(a, 2)).Value = a
ReDim a(1 To UBound(a, 1), 1 To UBound(a, 2))
t = t + UBound(a, 2)
n = 0
End If
Next
If n > 0 Then
Range("a1").Resize(n, UBound(a, 2)).Value = a
End If
End Sub
Bookmarks