How to print multiple selected rows on one page in Excel?
When printing selections in Excel, inconsecutive ranges will be printed on separated pages. In some cases, we may only need to print some selected rows/ranges on one page from a long table, but these selected rows/ranges are not consecutive. Therefore, how to print these rows/ranges on one page in Excel? There are several solutions:
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Here I will talk about printing multiple selected rows on one page with VBA in Excel. Please do as follows:
1. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and then paste the below VBA code into new opening Module window.
VBA: Print multiple selected rows on one page in Excel
Sub Extract_to_Print() Dim Rg As Range, Rg1 As Range, Rg2 As Range Dim xAddress As String Dim xSht As Worksheet Dim I As Long Dim xScreenUpdate As Boolean Dim xAlert As Boolean On Error Resume Next xAddress = Application.ActiveWindow.RangeSelection.Address Set Rg = Application.InputBox("Please select ranges you will print:", "Kutools for Excel", xAddress, , , , , 8) If Rg Is Nothing Then Exit Sub xScreenUpdate = Application.ScreenUpdating xAlert = Application.DisplayAlerts Application.ScreenUpdating = False Application.DisplayAlerts = False Set xSht = ThisWorkbook.Worksheets.Add I = 1 For Each Rg1 In Rg.Areas Rg1.Copy xSht.Range("A" & I) I = I + Rg1.Rows.Count Next xSht.PrintOut xSht.Delete Application.ScreenUpdating = xScreenUpdate Application.DisplayAlerts = xAlert End Sub
3. Press F5 key or click the Run button to run this VBA.
4. Now a Kutools for Excel dialog box pops up. Please select multiple rows that you will print, and click the OK button to print these rows.
Note: Holding the Ctrl key, you can select multiple nonadjacent rows at the same time.
If we can copy these inconsecutive rows and paste as a consecutive range in other worksheet, we can easily print them on one page. This method will introduce Kutools for Excel’s Copy Ranges utility to deal with it.
1. Create a new worksheet, next select rows that you will print from your table, and click Kutools > Copy Ranges.
Note: Holding the Ctrl key, you can select multiple inconsecutive rows at the same time.
2. In the opening Copy Multiple Ranges dialog box, check All option, and click the Ok button.
Note: The Including row height option and Including column width options will copy selected ranges’ row heights and column widths and pasted into destination range.
3. Select the Cell A1 in the new created worksheet, and click the OK Button.
4. Stay in the destination worksheet, and click Kutools > Delete > Delete Blank Rows > In Active Sheet.
And then a dialog box comes out and shows you how many rows have been deleted. Just close it.
5. Click the File (or Office button) > Print to print these rows.
Actually Kutools for Excel designs Print Multiple Selection Wizard to print multiple ranges together in Excel.
1. Click Enterprise > Printing > Print Multiple Selection Wizard to open the Print Multiple Selection Wizard.
2. In the opening Print Multiple Selection Wizard, click Add button to add rows that you will print together, and click the Finish button.
(1) After clicking the Add button , you can select multiple inconsecutive ranges in one worksheet by holding the Ctrl key and then selecting them one by one;
(2) To remove a range/row from the Ranges to print list, just select this range/row and click the Delete button.
(3) This utility does not support print entire rows and columns, such as entire row of $4:$4, or entire column of $B:$B.
3. Selected rows/ranges have been pasted as linked pictures in a new worksheet. Go ahead to click File (or Office button) > Print to print it.