Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
|
|||
|
|||
How to split column?
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. |
#2
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
|
|||
|
|||
How to split column?
Thank you Tom!
Y.B. Tom Ogilvy wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Split column and row | Excel Discussion (Misc queries) | |||
How do I split a column? | Excel Discussion (Misc queries) | |||
How do I split column? | Excel Discussion (Misc queries) | |||
can i somehow put two cells into one column or split a column | Excel Discussion (Misc queries) | |||
How to split one column into two? | Excel Worksheet Functions |