How to split column?

Y

Y. Belenky

Help please,
I've one long column (~65000 rows) of data in one sheet.
The question is how to split it to several columns
with 400 (for example) rows of the data in each?
Is there any known macro?
Thank you very much,
Y.B.
 
T

Tom Ogilvy

Sub AAA()
Dim i As Long, j As Long, n As Long
j = 0
For i = 1 To 65536 Step 400
j = j + 1
n = 400
If n + i > 65536 Then _
n = 65536 - i + 1
Cells(i, 1).Resize(n, 1).Copy Destination:= _
Worksheets("Sheet2").Cells(1, j)
Next
End Sub
 
Top