Sub topic 6
Controlling where pages break
This chapter covers how Excel places page breaks, how to move, insert, and remove them, and how they interact with scaling and print titles. It assumes you can navigate the ribbon, select ranges, and have already set a print area, orientation, and paper size. Those settings decide how much fits on a page, so they come first.
Automatic and manual page breaks
A page break is the line where one printed page ends and the next begins. Excel uses two kinds.
- Automatic breaks are placed by Excel when content no longer fits. They depend on paper size, orientation, margins, scaling, and the printer driver. Excel recalculates them whenever any of those change.
- Manual breaks are placed by you. They stay where you put them until you remove them.
On screen, breaks appear differently depending on the view:
| Break type | Normal view | Page Break Preview |
|---|---|---|
| Automatic | Dashed line (after you open Print Preview or run a print once) | Dashed blue line |
| Manual | Solid line | Solid blue line |
A horizontal break sits between rows and sets where one page ends vertically. A vertical break sits between columns and sets where a page ends horizontally. A worksheet is divided into a grid of pages. By default Excel numbers them "down, then over": it prints every page in the first column band from top to bottom, then moves to the next column band.
Working in Page Break Preview
Page Break Preview is the best place to control breaks, because it shows the whole print area with page numbers behind the cells and the breaks as draggable lines.
- Open View > Page Break Preview. If a welcome dialog appears, click OK.
- Look for the large gray page numbers ("Page 1", "Page 2") behind the data. Cells outside the print area are shaded gray and will not print.
- Hover over a blue line until the pointer becomes a double arrow, then drag it to a new row or column boundary.
- Return to Normal view from the same ribbon tab when you finish.
Editing cells works normally in this view. You can also use it to adjust the print area itself, by dragging the thick blue outer border.
Dragging an automatic break
When you drag an automatic break, Excel converts it into a manual break. That has a consequence people often miss: once you drag any break, the surrounding layout may stop adapting to content changes. If rows are added later, the manual break stays at its row number, and Excel will still add automatic breaks around it when pages overflow.
Dragging a break that conflicts with scaling
If the sheet uses Fit to scaling (for example 1 page wide), Excel ignores manual breaks in the dimension being fitted. In Page Break Preview, dragging a break inside a fitted dimension does not do what you expect. Excel may change the scaling mode from Fit to to Adjust to a percentage. Check the Scaling section on the Page Layout tab after you drag a break. If you want both fit-to-width and manual row breaks, set Width to 1 page and Height to Automatic, and then insert only horizontal breaks.
Inserting a manual break
A break is inserted above and to the left of the selected cell. What you select determines which kind of break you get.
| Selection | Result of Insert Page Break |
|---|---|
| A single cell, such as D20 | Both a horizontal break above row 20 and a vertical break left of column D |
| An entire row, such as row 20 | One horizontal break above row 20 |
| An entire column, such as column D | One vertical break left of column D |
| A cell in column A, such as A20 | One horizontal break above row 20, since there is nothing to the left |
| A cell in row 1, such as D1 | One vertical break left of column D |
To insert a break:
- Select the row below where you want the page to end, by clicking its row number.
- Go to Page Layout > Breaks > Insert Page Break.
Alternatively, in Page Break Preview, right-click the row number or cell and choose Insert Page Break.
Where manual breaks cannot go
Excel will not place a break inside a merged cell range in a way that splits it cleanly. A merged cell that spans rows 20 to 22 cannot be divided, so the break moves to its edge or the merged text is cut across pages. Avoid merged cells across likely break points. Use Center Across Selection (in Format Cells > Alignment > Horizontal) for horizontal centering, which does not merge cells.
Removing and resetting breaks
To remove one break, select the cell directly below a horizontal break or directly right of a vertical break, and choose Page Layout > Breaks > Remove Page Break. In Page Break Preview, you can also drag a manual break outside the print area.
To remove all manual breaks at once, choose Page Layout > Breaks > Reset All Page Breaks. This clears manual breaks on the active sheet only. It does not change the print area, scaling, or print titles. Automatic breaks remain because Excel recalculates them.
Note that Remove Page Break is only available when the selected cell is next to a manual break. If the command is gray, you either selected the wrong cell or the break is automatic.
How scaling decides which breaks matter
Breaks and scaling work together, and the order of influence is worth knowing:
- Paper size, orientation, and margins define the printable area of one page.
- Scaling shrinks or enlarges content, which changes how many rows and columns fit.
- Excel places automatic breaks where the scaled content exceeds the printable area.
- Manual breaks are then applied, unless Fit to overrides them.
Consider a report with 55 rows and one wide table. With Adjust to 100%, Excel might break at row 45 automatically. If you insert a manual break above row 30, page 1 holds rows 1 to 29, and Excel then continues with an automatic break at about row 74 relative to the new start, so page 2 holds the rest. Manual breaks do not renumber or reflow earlier pages. They only restart the count for the next page.
If a manual break is placed where an automatic one would have fallen anyway, the page count does not change. If it is placed earlier, you may end up with a short page followed by a full one. That is the intended behavior, but it often produces a nearly empty last page, so check the final page in Print Preview.
Keeping related rows together
Excel has no "keep rows together" or "avoid orphan" setting. You control it by hand.
- Insert a manual break above a section heading so the heading always starts a page.
- Move a break up so that a group of rows, such as a subtotal block, stays with its detail rows.
- Avoid splitting a short table across two pages. If the table is 12 rows and only 8 fit, insert a break above the table.
Because manual breaks are tied to row positions, sorting, inserting, or deleting rows can leave a break in the wrong place. After structural edits, reopen Page Break Preview and check each break. Excel moves a break along with its row when you insert rows above it, but it does not understand which rows belong together.
Print titles and breaks
When a table spans several pages, you usually want the header row repeated on each one. Print titles (set under Page Layout > Print Titles) repeat chosen rows at the top of every page after a break. Two details affect breaks:
- The repeated rows take up space on each page after the first, so fewer data rows fit on pages 2 and onward. A break you placed to produce a neat page 1 may fall differently on later pages because of this.
- A manual break placed inside the title rows themselves can produce odd results. Place breaks below the title rows.
Setting breaks with VBA
You can manage breaks in code through the HPageBreaks and VPageBreaks collections. The following macro clears existing manual breaks on the active sheet, then inserts a horizontal break above every row whose column A value is "Section". It switches to a fixed-size layout first, because fit-to-page scaling can ignore manual breaks.
Sub BreakBeforeEachSection()
Dim ws As Worksheet
Dim lastRow As Long
Dim r As Long
Set ws = ActiveSheet
ws.ResetAllPageBreaks
With ws.PageSetup
.Zoom = 100
End With
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
For r = 2 To lastRow
If ws.Cells(r, "A").Value = "Section" Then
ws.HPageBreaks.Add Before:=ws.Cells(r, "A")
End If
Next r
End SubHPageBreaks.Add takes a Before argument, the cell that will sit just below the new break. Use VPageBreaks.Add for vertical breaks. Setting .Zoom = 100 also turns off Fit to scaling, so the manual breaks take effect. Reading ws.HPageBreaks.Count after the macro runs gives the number of horizontal breaks, including automatic ones, and each item has a Type property that distinguishes them (xlPageBreakManual or xlPageBreakAutomatic).
Common problems with breaks
| Symptom | Likely cause | Fix |
|---|---|---|
| A break you inserted has no effect | Sheet uses Fit to scaling in that direction | Set that dimension to Automatic, or use Adjust to |
| A page splits down the middle unexpectedly | A single cell was selected when inserting the break, which added a vertical break | Remove the vertical break; reinsert using a whole row |
| Blank page at the end | A manual break or formatting beyond the data extends the print range | Reset breaks, then check the print area and clear formatting from unused rows |
| Breaks keep moving | Printer driver or paper size changed | Fix the paper size on the sheet and avoid switching printers before export |
| Remove Page Break is gray | Selected cell is not adjacent to a manual break | Select the cell below or right of the break, or use Reset All Page Breaks |
Because automatic breaks depend on the printer driver, a layout that looks right on your computer can paginate differently on another machine. Manual breaks and a fixed paper size reduce that difference. Exporting to PDF on one machine and sharing the file avoids it altogether.
Exercise
A sheet is set to Fit to 1 page wide by Automatic tall. You select cell F30 and choose Insert Page Break, then find that the page still splits on the left of column F and nothing seems to happen to the rows. Explain what went wrong and give the steps to get a clean horizontal break above row 30 only.
Show answer
Selecting a single cell inserts both a horizontal break above row 30 and a vertical break left of column F. The vertical break is ignored because the sheet is fitted to 1 page wide, and any visible split in that direction comes from the page width limit. To fix it, first use Page Layout > Breaks > Reset All Page Breaks. Then click the row 30 header to select the whole row and choose Page Layout > Breaks > Insert Page Break. Keep Width at 1 page and Height at Automatic so the horizontal break is honored. Confirm the result in Page Break Preview, where the new break appears as a solid blue line between rows 29 and 30.
Exercise
You drag an automatic page break in Page Break Preview, and afterward the Scaling section on the Page Layout tab shows Adjust to 85% instead of Fit to. Why did this happen, and how would you restore one page wide while keeping your row breaks?
Show answer
Dragging a break in a dimension that Fit to controls forces Excel to abandon Fit to and apply a fixed percentage. To restore the layout, set Width to 1 page and Height to Automatic on the Page Layout tab. Then delete any vertical manual breaks, and keep or reinsert only horizontal breaks by selecting whole rows. Check Page Break Preview again to confirm the breaks are still where you want them.