Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split column and row Jackie Excel Discussion (Misc queries) 3 October 16th 08 02:14 PM
How do I split a column? Wally Excel Discussion (Misc queries) 1 February 6th 08 09:56 PM
How do I split column? prakash Excel Discussion (Misc queries) 3 September 14th 06 02:08 PM
can i somehow put two cells into one column or split a column Chrono Excel Discussion (Misc queries) 1 September 5th 05 06:20 PM
How to split one column into two? Robert Judge Excel Worksheet Functions 6 December 24th 04 06:36 PM


All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"