How to insert page break every x rows in Excel?
It may be easy and simple for you to insert a page break into a worksheet. Sometimes, it's required to insert page breaks in every X rows for printing tidily, how could you do? Here I introduce a couple of methods to solve this problem in Excel.
- Insert page break every X rows with VBA in Excel
- Batch insert page breaks after every x rows
- Batch insert page breaks after every x rows with adding row heading above every x rows
Insert page break every X rows with VBA in Excel
Maybe you are not familiar with VBA running before, but with the follow steps you may know how to run the VBA to insert a page break every X rows. Here I will insert a page break in every 3 rows.
1. Press Alt + F11 to display the Microsoft Visual Basic for Applications window.
2. In the window, click Insert > Module to show a new module window, then copy the following VBA code into the module window.
VBA: Insert page break in every X rows in a worksheet.
Sub InsertPageBreaks()
'Updateby20140618
Dim xLastrow As Long
Dim xWs As Worksheet
Set xWs = Application.ActiveSheet
xRow = Application.InputBox("Row", xTitleId, "", Type:=1)
xWs.ResetAllPageBreaks
xLastrow = xWs.Range("A1").SpecialCells(xlCellTypeLastCell).Row
For i = xRow + 1 To xLastrow Step xRow
xWs.HPageBreaks.Add Before:=xWs.Cells(i, 1)
Next
End Sub
3. Click Run button and a dialog pops out for you to specify every X rows you want to insert a page break in. Here I insert page break in every 3 rows. See screenshot:
4. Click OK, and then it will insert a page break in every X rows.
Quickly insert page break every (nth) row in active worksheet
Normally we insert one page break with clicking Page Layout > Breaks > Insert Page Break. But this way it too tedious to batch insert multiple page breaks in a worksheet, such as you need to insert one page break every row for printing each row in a separate page. Don’t Worry! Kutools for Excel’s Insert Page Break Every Row utility can help you easily archive it!
Full Feature Free Trial
30-day!
Batch insert page breaks after every x rows with Kutools for Excel
If you have Kutools for Excel installed, its Split to Columns utility can help you batch insert multiple page breaks after every x rows with keeping title in each page easily in Excel.
Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Free Trial Now!
1. Click Split to Columns on the Kutools Plus tab.
2. In the opening Split to Columns dialog box, you need to:
(1) Click the Browse button in the Titles range box, and select the title row in the specified range that you will batch insert page breaks.
(2) Click the Browse button in the Date range box, and select the range that you will batch insert page breaks.
(3) In the Rows per printed page box, enter a number. (Tip: For example, if you need to insert page breaks after every 3 rows, please enter 3 into the box; if you need to inert page breaks after every row, please enter 1.)
(4) Enter 1 into the Number of segments box.
3. Click the Ok button.
Now you will see the range is copied into a new worksheet, and page breaks are added after every x rows with keeping range title. You can also switch to the Page Break Preview view by clicking View > Page Break Preview to see these page breaks. See below screen shot.
Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now
Insert page breaks after every x rows with Kutools for Excel
Kutools for Excel develops another Insert Page Break Every Row utility specializing in inserting page breaks after every x rows at ease.
Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Free Trial Now!
1. Select the range that you will insert page breaks after every x rows, and click Printing > Insert Page Break Every Row on the Kutools Plus tab.
2. In the opening Insert Page Break Every Row dialog box, specify the interval of rows that you will insert page breaks at, and click the Ok button.
Then you will see page breaks are inserted at the specified interval of rows at once.
Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now
Demo: insert page break every x rows in Excel
Relative Articles:
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
- Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
