Sub Demo2() With Cells(1).CurrentRegion: AR = .Value: .Clear: End With C = Array(3, 1, 2): N& = UBound(AR) \ 3: R& = 1 ReDim VA(1 To N - (UBound(AR) > N * 3), 1 To 3) For N = 1 To UBound(AR): M% = N Mod 3: VA(R, C(M)) = AR(N, 1): R = R - (M = 0): Next Cells(1).Resize(UBound(VA), 3).Value = VA End Sub
Thanks for the rep' !
Ah, may i know what is the difference between this and the previous one? Both seem to work well with large data
Bookmarks