Printing from Excel

  • Thread starter Thread starter TonyL
  • Start date Start date
T

TonyL

I have an Excel spreadsheet which has 1 column of data & is not that wide. I
wanted to know if there was an easy way to have it printed say 4 or 5 columns
per page to save paper. TIA
 
Try this macro on a copy of your sheet to snake one column into many.

Public Sub SplitToCols()
Dim NumCols As Integer
Dim I As Integer
Dim colsize As Long
On Error GoTo fileerror

NumCols = InputBox("Choose Final Number of Columns")
colsize = Int((ActiveSheet.UsedRange.Rows.Count + _
(NumCols - 1)) / NumCols)
For I = 2 To NumCols
Cells((I - 1) * colsize + 1, 1).Resize(colsize, 1).Copy Cells(1, I)
Next I
Range(Cells(colsize + 1, 1), Cells(Rows.Count, 1)).Clear
fileerror:
End Sub


Gord Dibben MS Excel MVP
 

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