Printing Options

C

Coverton

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?
 
G

Gord Dibben

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
 
C

Coverton

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.
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top