Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're welcome.
Thanks for the feedback. Gord On Mon, 9 Apr 2007 12:10:04 -0700, Candice wrote: THANKS!! We got it to work! I really appreciate your help. "Gord Dibben" wrote: As you add more rows these will be placed in C & D and E & F always 50 rows to a set. As written the code inserts a blank row between each set of 50. If you would prefer a pagebreak use this code. Sub Move_Sets_PBreak() Dim iSource As Long Dim iTarget As Long iSource = 1 iTarget = 1 Do Cells(iSource, "A").Resize(50, 2).Cut _ Destination:=Cells(iTarget, "A") Cells(iSource + 50, "A").Resize(50, 2).Cut _ Destination:=Cells(iTarget, "C") Cells(iSource + 100, "A").Resize(50, 2).Cut _ Destination:=Cells(iTarget, "E") iSource = iSource + 150 iTarget = iTarget + 50 PageBreak = xlPageBreakManual Loop Until IsEmpty(Cells(iSource, "A").Value) End Sub Gord On Mon, 09 Apr 2007 11:02:14 -0700, Gord Dibben <gorddibbATshawDOTca wrote: Candice This macro should do what you want. Rows 1-50 in columns A & B 51-100 in columns C & D 101-150 in columns E & F 151-200 in columns A & B Sub Move_Sets() Dim iSource As Long Dim iTarget As Long iSource = 1 iTarget = 1 Do Cells(iSource, "A").Resize(50, 2).Cut _ Destination:=Cells(iTarget, "A") Cells(iSource + 50, "A").Resize(50, 2).Cut _ Destination:=Cells(iTarget, "C") Cells(iSource + 100, "A").Resize(50, 2).Cut _ Destination:=Cells(iTarget, "E") iSource = iSource + 150 iTarget = iTarget + 51 Loop Until IsEmpty(Cells(iSource, "A").Value) End Sub Gord On Mon, 9 Apr 2007 10:38:00 -0700, Candice wrote: "snaked". I didn't know the terminology. I want it to fill the first 2 columns to the bottom of the first page, then go to the 3 & 4 columns of the first page, then 5 & 6 columns of the first page, then go to the first & second columns of the second page. Thanks! "Gord Dibben" wrote: Candice How do you want the new six columns laid out? "Snaked" or in sets of say, 50 rows each? I can provide a macro for either mode. Gord Dibben MS Excel MVP On Mon, 9 Apr 2007 08:26:01 -0700, Candice wrote: I have a long list of data. It is currently in 2 columns, one large in width, and the second small in width. It is over 200 rows in length (and will need to be continually added to). I am trying to print on as few pages as possible, so would like the data to automatically fill over to make additional columns on each page. I know that in "Word" there is the ability to set the columns automatically to the desired #. I can fit my current columns 3 times on the page width. Is there any way of setting this up to automatically do it for me or do I just have to cut and paste?? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arrange data spanning 8 columns and 3 rows to 24 columns and 1 row | Excel Discussion (Misc queries) | |||
to convert columns to rows having mulit independent group columns | Excel Worksheet Functions | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Combine multiple columns into two long columns, Repeating rows in first column | Excel Discussion (Misc queries) | |||
Pivot Table Creating New Columns that Subtract Two Existing Columns | Excel Discussion (Misc queries) |