View Single Post
  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to split column?

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


--
Regards,
Tom Ogilvy




"Y. Belenky" wrote in message
...
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.