Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default columns

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
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
Arrange data spanning 8 columns and 3 rows to 24 columns and 1 row pfdino Excel Discussion (Misc queries) 2 March 19th 07 09:03 PM
to convert columns to rows having mulit independent group columns Quacy Excel Worksheet Functions 1 August 22nd 06 11:20 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Pivot Table Creating New Columns that Subtract Two Existing Columns den4673 Excel Discussion (Misc queries) 3 December 17th 04 01:31 PM


All times are GMT +1. The time now is 10:43 AM.

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

About Us

"It's about Microsoft Excel"