Print each column seperately in Excel

  • Thread starter Thread starter Pinchgem
  • Start date Start date
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
 
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
 
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
 

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

Back
Top