ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Printing consolidation... (https://www.excelbanter.com/excel-discussion-misc-queries/101204-printing-consolidation.html)

asjboarder

Printing consolidation...
 

I have a spreadsheet with data in colums A-D, and rows 1-9918. This is
obviously a HUGE print straight through. Is there a way to consolidate
the rows to make 2 sets of columns? (IE: Page 1 of the print would
consist of rows 1-60 in columns A-D, and rows 61-120 in columns E-H;
Page 2: 121-180 in A-D and 181-240 in E-H; and so on).

Thanks in advance for any help.


Adam


--
asjboarder
------------------------------------------------------------------------
asjboarder's Profile: http://www.excelforum.com/member.php...o&userid=36766
View this thread: http://www.excelforum.com/showthread...hreadid=564831


asjboarder

Printing consolidation...
 

anyone?

This is somewhat important...I need it for the end of the week!


--
asjboarder
------------------------------------------------------------------------
asjboarder's Profile: http://www.excelforum.com/member.php...o&userid=36766
View this thread: http://www.excelforum.com/showthread...hreadid=564831


Dave Peterson

Printing consolidation...
 
I like to copy the data into MSWord and use MSWord's builtin ability to do
column layout. With lots of data, I sometimes have to paste into Notepad
first--large tables cause me trouble in MSWord.

If that doesn't work for you, David McRitchie has a macro that will "snake" the
columns.
http://www.mvps.org/dmcritchie/excel/snakecol.htm

Or you could write your own--kind of like:

Option Explicit
Sub testme()
Dim CurWks As Worksheet
Dim NewWks As Worksheet
Dim LastRow As Long
Dim FirstRow As Long
Dim iRow As Long
Dim oRow As Long
Dim myStep As Long

Set CurWks = Worksheets("sheet1")
Set NewWks = Worksheets.Add

With CurWks
FirstRow = 1
'last row in column A or just 9918??
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
myStep = 120
oRow = 1

For iRow = FirstRow To LastRow Step myStep
.Cells(iRow, "A").Resize(myStep / 2, 4).Copy
NewWks.Cells(oRow, "A").PasteSpecial Paste:=xlPasteValues
.Cells(iRow + myStep / 2, "A").Resize(myStep / 2, 4).Copy
NewWks.Cells(oRow, "E").PasteSpecial Paste:=xlPasteValues
If oRow 1 Then
With NewWks
.HPageBreaks.Add Befo=.Cells(oRow, "A")
End With
End If
oRow = oRow + myStep / 2
Next iRow
End With

NewWks.UsedRange.Columns.AutoFit

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


asjboarder wrote:

I have a spreadsheet with data in colums A-D, and rows 1-9918. This is
obviously a HUGE print straight through. Is there a way to consolidate
the rows to make 2 sets of columns? (IE: Page 1 of the print would
consist of rows 1-60 in columns A-D, and rows 61-120 in columns E-H;
Page 2: 121-180 in A-D and 181-240 in E-H; and so on).

Thanks in advance for any help.

Adam

--
asjboarder
------------------------------------------------------------------------
asjboarder's Profile: http://www.excelforum.com/member.php...o&userid=36766
View this thread: http://www.excelforum.com/showthread...hreadid=564831


--

Dave Peterson


All times are GMT +1. The time now is 07:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com