wrap columns to print in rows

  • Thread starter Thread starter jenn
  • Start date Start date
J

jenn

I have 5 rows of day that grows by a column every two weeks. Each payroll
period end date produces the new column and the information in the rows
below. It is only 5 rows and at this time will print all the columns on one
page. Can I tell it to print columns A thru J and then print K thru R on rows
6 thru 11 and then S thru AB on 13 thru 18?

try to wrap the window to keep all the information on one page.
 
Jenn
You would need VBA programming to do this. Essentially, you would have
a macro that you would execute be any one of several means. That macro
would copy all your date to another sheet, then arrange the data in that
"other" sheet like you want, and then print. Do you know that your column
ranges are not the same width? Is that what you want? Your first range,
A:J is 10 columns, as is S:AB, while K:R is 8 columns.
The following macro does what you want, using 10 column brackets. Post back
if you need more. HTH Otto
Sub PrintAll()
Dim TheRng As Range
Dim c As Long
With Sheets("PrintSht")
.Cells.ClearContents
Cells.Copy .Cells(1, 1)
Set TheRng = .Range("A1:J5")
For c = 1 To 50
If Not IsEmpty(TheRng.Offset(, c * 10)(1)) Then
TheRng.Offset(, c * 10).Copy .Range("A" &
Rows.Count).End(xlUp).Offset(2)
End If
Next c
.Range("A1", .Range("A" & Rows.Count).End(xlUp)).Resize(,
10).PrintOut
End With
End Sub
 
Back
Top