Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Rows to Columnsq

I have a large number of rows that are made up of approximately 5000 records
with 10 rows per record. I want to take every ten rows and distribute it into
separate columns , and do that in each following row for each of the next
records. What is the easiest way to do that?
--
JOE
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Rows to Columnsq

I'm going to do this using 20 rows per column since excel 2003 is limited to
256 columns 5000/20 = 250). I'm also assuming the data is in column A and
the results will be put starting in column B.

Sub splitrows()
NewCol = 2
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For RowCount = 1 To LastRow Step 20
Range("A" & RowCount & ":A" & (RowCount + 19)).Copy _
Destination:=Cells(1, NewCol)
NewCol = NewCol + 1
Next RowCount
End Sub




"JOE POLLOCK" wrote:

I have a large number of rows that are made up of approximately 5000 records
with 10 rows per record. I want to take every ten rows and distribute it into
separate columns , and do that in each following row for each of the next
records. What is the easiest way to do that?
--
JOE

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
colating multi rows of data into single rows - no to pivot tables! UKMAN Excel Worksheet Functions 4 March 12th 10 04:11 PM
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. Conan Kelly Excel Programming 1 November 16th 07 10:41 PM
Copy pasting Rows, but need to Delete any Shapes/Pictures that are within copied rows Corey Excel Programming 2 August 1st 07 02:02 AM
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 13th 07 11:05 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM


All times are GMT +1. The time now is 02:17 AM.

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"