Printing

  • Thread starter Thread starter george stewart
  • Start date Start date
G

george stewart

I have a large no of columns in my spread sheet. I would
like to be able to print the columns half above the other.
IE Columns 1 to 5 in Row 1, then Columns 6 to 10 in row 2.
Etc Etc.
Many Thanks
Geo
 
George

Either of these macros may do what you want.

Sub WrapUnder10()
''wrap 10 columns to 5,5 in groups
Dim i As Long
For i = Range("A1").End(xlDown).Row To Range("A1").Row Step -1
Cells(i + 1, 1).EntireRow.Insert
Cells(i, 1).Range("F1:J1").Cut Cells(i + 1, 1)
Next i
End Sub


Sub WrapUnder15()
''wrap 15 columns to 5,5,5 in groups
Dim i As Long
For i = Range("A1").End(xlDown).Row To Range("A1").Row Step -1
Cells(i + 1, 1).EntireRow.Insert
Cells(i + 1, 1).EntireRow.Insert
Cells(i, 1).Range("F1:J1").Cut Cells(i + 1, 1)
Cells(i, 1).Range("K1:O1").Cut Cells(i + 2, 1)
Next i
End Sub

Gord Dibben Excel MVP
 
Many thanks.
-----Original Message-----
George

Either of these macros may do what you want.

Sub WrapUnder10()
''wrap 10 columns to 5,5 in groups
Dim i As Long
For i = Range("A1").End(xlDown).Row To Range("A1").Row Step -1
Cells(i + 1, 1).EntireRow.Insert
Cells(i, 1).Range("F1:J1").Cut Cells(i + 1, 1)
Next i
End Sub


Sub WrapUnder15()
''wrap 15 columns to 5,5,5 in groups
Dim i As Long
For i = Range("A1").End(xlDown).Row To Range("A1").Row Step -1
Cells(i + 1, 1).EntireRow.Insert
Cells(i + 1, 1).EntireRow.Insert
Cells(i, 1).Range("F1:J1").Cut Cells(i + 1, 1)
Cells(i, 1).Range("K1:O1").Cut Cells(i + 2, 1)
Next i
End Sub

Gord Dibben Excel MVP



.
 
Gordon,
Many Thanks,
One more Problem/Opportunity! I have quite a number of
rows that I require to split. Any additional help would be
greatly received.
Geo
 

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