Print two sets of columns per page
My list is 3 columns in width but I'd like to print 2 sets of columns per
page, how could I tweak this formula to fit my circumstances?
"Gord Dibben" wrote:
Good to hear.
Thanks for the feedback.
Gord
On Fri, 15 Aug 2008 05:56:02 -0700, AnotherNewGuy
wrote:
I got it. I got all ambitious and set up the worksheet as landscape and
added two more columns. Working through the logic and making the necessary
changes was very helpful. Again, many thanks.
"Gord Dibben" wrote:
Thanks for the feedback.
When editing the Resize(50, 2) which is rows and columns don't forget to
edit also
iSource = iSource + 100
iTarget = iTarget + 50
Gord
On Wed, 13 Aug 2008 11:43:15 -0700, AnotherNewGuy
wrote:
Works great! I just need to edit for page length and make sure it doesn't
change.
thx
"Gord Dibben" wrote:
Maybe something like this...........?
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")
iSource = iSource + 100
iTarget = iTarget + 50
PageBreak = xlPageBreakManual
Loop Until IsEmpty(Cells(iSource, "A").Value)
End Sub
Gord
On Tue, 12 Aug 2008 05:53:00 -0700, AnotherNewGuy
wrote:
Thank you, Gordon. Actually, I want to start at the top left of page one,
skip to the top right, then to the top left of page two, etc.
But what you did here showed me how to get moving. Very helpful.
"Gord Dibben" wrote:
Public Sub Snake2to4()
Dim myRange As Range
Dim colsize As Long
Dim maxrow As Long
Const numgroup As Integer = 2
Const NUMCOLS As Integer = 4
On Error GoTo fileerror
Columns("A:B").Select
colsize = Int((ActiveSheet.UsedRange.Rows.Count + _
((NUMCOLS - 1)) / NUMCOLS)) / numgroup
MsgBox "Number of Rows to Move is: " & colsize
Range("A1").Select
With ActiveCell.Parent.UsedRange
maxrow = .Cells(.Cells.Count).Row + 1
End With
ActiveCell.Parent.Cells(maxrow, ActiveCell.Column) _
.End(xlUp).Offset(1, 0).Select
Set myRange = Range(ActiveCell.Address & ":" _
& ActiveCell.Offset(-colsize, (numgroup)).Address)
myRange.Cut Destination:=ActiveSheet.Range("C1")
Application.CutCopyMode = False
Range("A1").Select
fileerror:
End Sub
Gord Dibben MS Excel MVP
On Mon, 11 Aug 2008 09:31:21 -0700, AnotherNewGuy
wrote:
I have a simple list of items that keeps growing. Periodically, I print that
list with an empty column B for hand written notes. it's narrow enough that
I'd like to print it with Column A and B down the left side of the page, then
start at the top of the left half and down again. Obviously, the intent is
to use half the paper.
Right now, I'm just copying the list to a new spreadsheet, setting up the
page in Page Setup, and cutting and pasting manually.
Is there a better way?
thx
|