Print each column seperately in Excel

P

Pinchgem

I am very new to macro creation, but I am working on trying to create a macro
for an excel spreadsheet that will print each column on a seperate sheet of
paper.

Does anyone have any macros that will do this, or at least be able to point
me in the right direction?

Thanks
 
B

Bernard Liengme

Sub Tryme()
For Each col In Range("A1:D1")
j = j + 1
Cells(1, j).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PrintOut Copies:=1, Collate:=True
Next
End Sub

best wishes
 
R

Rick Rothstein

Give this macro a try...

Sub PrintColumns()
Dim R As Range
Dim PA As String
Dim LastRow As Long
With Worksheets("Sheet1")
PA = .PageSetup.PrintArea
For Each R In .Columns
LastRow = .Cells(.Rows.Count, R.Column).End(xlUp).Row
If LastRow > 1 Or (LastRow = 1 And Len(.Cells(1, R.Column)) > 0) Then
.PageSetup.PrintArea = .Range(.Cells(1, R.Column), _
.Cells(LastRow, R.Column)).Address
.PrintOut
End If
Next
.PageSetup.PrintArea = PA
End With
End Sub
 
Top