ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Printing Options (https://www.excelbanter.com/excel-worksheet-functions/213783-printing-options.html)

Coverton

Printing Options
 
If you have a spreadsheet that only has two columns too it, is there a way to
have those two columns continue printing on the same page until that page is
full than roll to a second page?

ex:

Column A Column B Column A Column B Column A Column B

To utilize paper?



Gord Dibben

Printing Options
 
This macro may do what you want.

It takes two long columns and changes to eight shorter columns in sets of 50
with a blank line in between the sets of 50.

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")
Cells(iSource + 150, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "G")
iSource = iSource + 200
iTarget = iTarget + 51
Loop Until IsEmpty(Cells(iSource, "A").Value)

End Sub


Gord Dibben MS Excel MVP

On Mon, 15 Dec 2008 16:00:01 -0800, Coverton
wrote:

If you have a spreadsheet that only has two columns too it, is there a way to
have those two columns continue printing on the same page until that page is
full than roll to a second page?

ex:

Column A Column B Column A Column B Column A Column B

To utilize paper?



Coverton

Printing Options
 
Hi Gord

I entered this macro in but I get an error.

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")
Cells(iSource + 150, "A").Resize(50, 2).Cut_
Destination = Cells(iTarget, "G")
iSource = iSource + 200
iTarget = iTarget + 51
Loop Until IsEmpty(Cells(iSource, "A").Value)


'
End Sub

The error says Object doesn't support this property or method. Can you give
me direction on where I messed up?

Thanks.

"Gord Dibben" wrote:

This macro may do what you want.

It takes two long columns and changes to eight shorter columns in sets of 50
with a blank line in between the sets of 50.

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")
Cells(iSource + 150, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "G")
iSource = iSource + 200
iTarget = iTarget + 51
Loop Until IsEmpty(Cells(iSource, "A").Value)

End Sub


Gord Dibben MS Excel MVP

On Mon, 15 Dec 2008 16:00:01 -0800, Coverton
wrote:

If you have a spreadsheet that only has two columns too it, is there a way to
have those two columns continue printing on the same page until that page is
full than roll to a second page?

ex:

Column A Column B Column A Column B Column A Column B

To utilize paper?




Gord Dibben

Printing Options
 
What you just posted is not what I originally posted.

Did you copy the entire macro to a general module in your workbook?

Copy all from Sub Move_Sets() down to End Sub


Gord

On Tue, 16 Dec 2008 10:01:02 -0800, Coverton
wrote:

Hi Gord

I entered this macro in but I get an error.

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")
Cells(iSource + 150, "A").Resize(50, 2).Cut_
Destination = Cells(iTarget, "G")
iSource = iSource + 200
iTarget = iTarget + 51
Loop Until IsEmpty(Cells(iSource, "A").Value)


'
End Sub

The error says Object doesn't support this property or method. Can you give
me direction on where I messed up?

Thanks.

"Gord Dibben" wrote:

This macro may do what you want.

It takes two long columns and changes to eight shorter columns in sets of 50
with a blank line in between the sets of 50.

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")
Cells(iSource + 150, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "G")
iSource = iSource + 200
iTarget = iTarget + 51
Loop Until IsEmpty(Cells(iSource, "A").Value)

End Sub


Gord Dibben MS Excel MVP

On Mon, 15 Dec 2008 16:00:01 -0800, Coverton
wrote:

If you have a spreadsheet that only has two columns too it, is there a way to
have those two columns continue printing on the same page until that page is
full than roll to a second page?

ex:

Column A Column B Column A Column B Column A Column B

To utilize paper?






All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com