How to print multiple selections on one page in Excel?
If you have a large worksheet which contains much data, and now, you want to print some selected ranges which are non-continuous in one page, so that you can save much paper. Excel provides the Set Print Arear feature for us to print multiple selections at once, but, each selected ranges will be printed into one page separately. This article will talk about how to print multiple non-continuous selections on one page.
To print multiple selected non-contiguous selections of one worksheet in one page, the following VBA code may help you, please do as follows:
1. Press Ctrl key to select the ranges that you want to print.
2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
3. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Print multiple selections into one page
Sub PrintOutRange() 'Update 20150528 Dim xRng1 As Range Dim xRng2 As Range Dim xNewWs As Worksheet Dim xWs As Worksheet Dim xIndex As Long Application.ScreenUpdating = False Application.DisplayAlerts = False Set xWs = ActiveSheet Set xNewWs = Worksheets.Add xWs.Select xIndex = 1 For Each xRng2 In Selection.Areas xRng2.Copy Set xRng1 = xNewWs.Cells(xIndex, 1) xRng1.PasteSpecial xlPasteValues xRng1.PasteSpecial xlPasteFormats xIndex = xIndex + xRng2.Rows.Count Next xNewWs.Columns.AutoFit xNewWs.PrintOut xNewWs.Delete Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub
4. Then press F5 key to run this code, and your selected ranges will be printed at once, and they will be printed into a single page.
The above code only can help you to print the selected ranges from one worksheet, if you want multiple selections from several worksheets to be printed into one page, the above code will not work. Please don’t worry, here, I can introduce you a handy tool – Kutools for Excel, with its Print Multiple Selection Wizard utility, you can print the selections from one worksheet or multiple worksheets into one page at once.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
After installing Kutools for Excel, please do with following steps:
1. Click Enterprise > Printing > Print Multiple Selection Wizard, see screenshot:
2. In the Print Multiple Selection Wizard, click button to select and add the range that you want to print into the Ranges to print list box one by one, (you can select the ranges from one worksheet or multiple worksheets ), click button can remove the ranges you don’t need, see screenshot:
3. After adding the selections into the list box, please click Next >> button to go to step 2 of the wizard, specify the print settings as you need, and you can add a blank row between the selected ranges by check Add a blank row between ranges option, see screenshot:
4. Then go on clicking Next >> butoon, in step 3 of the wizard, specify the action for the temporary worksheet, you can active the worksheet but don’t print, print the worksheet and keep it or print the worksheet and delete it. See screenshot:
5. Click Finish button, all of the selected ranges have been pasted into a new worksheet as a linked picture objects. And you can drag and rearrange them in the worksheet. See screenshot:
6. When you print this new worksheet, the ranges will be printed into one single page as you need.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 2 years agohow to print selection area with multi print ? i means selection area i wan to print 10 times
To post as a guest, your comment is unpublished.· 3 years agoI tried your VBA code with Excel 2016 and I get an error: Compile Error: Sub of Function not defined.
This line is highlighted: Set [b]xRng1[/b] = xNewWs.Cells(xIndex, 1)