Print multiple selections on one page

Bruno_x

Active Member
Joined
Feb 17, 2002
Messages
491
I want to print several selected area's on only one page. Excel can print selected cells, but excel prints every selection on a different page...
Lotus 1-2-3 can do it, so why not in XL ?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi Bruno

Try some code along this line.

Sub PrintSetUp()
Dim i As Integer
Dim wsSheetStart As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Set wsSheetStart = ActiveSheet

Sheets.Add().Name = "MyPrintSheet"
If ActiveSheet.Name <> "MyPrintSheet" Then ActiveSheet.Delete
Application.DisplayAlerts = True

wsSheetStart.Select
Set wsSheetStart = Nothing

For i = 1 To Selection.Areas.Count
Selection.Areas(i).Copy Destination:= _
Sheets("MyPrintSheet").Range("A65536").End(xlUp).Offset(2, 1)
Next i

Application.ScreenUpdating = True
End Sub


Should set it up ready for printing, you may need to tweek it a bit to suit
 
Upvote 0
Hi Dave, I was already thinking at some code like yours... I don't think it's possible without vba.

I have some problems with your code :
- the selections are copied one above the other, starting at cell B3, so instead of Offset(2, 1) there must be something to count the lines of the selection

- the ColumnWidth and RowHeight in the sheet 'MyPrintSheet' are not like the original cells

- for the cells where formula's are used, i get a error (solution : paste only values ?)
 
Upvote 0
The first problem is already solved with this code :
<pre>wsSheetStart.Select
Set wsSheetStart = Nothing
RowsUsed = 0
For i = 1 To Selection.Areas.Count
Selection.Areas(i).Copy Destination:= _
Sheets("MyPrintSheet").Range("A1").Offset(RowsUsed, 0)
RowsUsed = RowsUsed + Selection.Areas(i).Rows.Count
Next i

</pre>

only two problems to go...
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,938
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top