Printing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet with 5 long columns of information. I am trying to
print it using 2 "newpaper" columns in portrait format and can't get it. Can
someone help?
Cheers
Heather
 
Public Sub Snake5to10()
Dim myRange As Range
Dim colsize As Long
Dim maxrow As Long
Const numgroup As Integer = 2
Const NUMCOLS As Integer = 5
On Error GoTo fileerror
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, (NUMCOLS - 1)).Address)
myRange.Cut Destination:=ActiveSheet.Range("E1")
Application.CutCopyMode = False
Range("A1").Select
fileerror:
End Sub


Gord Dibben MS Excel MVP
 
Back
Top