Cellwise Start free

Excel guide · 5 min read

How to remove the dotted page break lines in Excel

Quick answerThe thin dotted (dashed) lines that appear after you print, use Print Preview or leave Page Break Preview are automatic page breaks. Go to File > Options > Advanced, scroll to Display options for this worksheet, untick Show page breaks and click OK. If you see blue lines with "Page 1" watermarks instead, you're in Page Break Preview: click View > Normal.

Sample data

Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.

RowABC
1What you seeWhat it isHow to remove it
2Thin dashed lines in Normal viewAutomatic page breaks, shown after a preview or printFile > Options > Advanced > untick Show page breaks
3Blue lines and "Page 1" watermarksPage Break PreviewView > Normal
4White gaps between pages, rulersPage Layout viewView > Normal
5Solid line that stays after the aboveA manual page breakPage Layout > Breaks > Reset All Page Breaks
6Moving dashed border round a rangeCopy mode ("marching ants")Press Esc
7Dotted line that printsA dotted cell borderHome > Borders > No Border

1. Turn off Show page breaks

Once you print, preview or change page setup, Excel starts drawing a dashed line wherever one printed page ends. They don't print and they don't change your data; they're a guide. But on a big sheet they look like stray borders, and they don't go away on their own.

  1. Go to File > Options > Advanced.
  2. Scroll down to Display options for this worksheet and check the sheet name in the box is the one you're looking at.
  3. Untick Show page breaks.
  4. Click OK. The dashed lines disappear from that sheet.

2. Why they come back

The setting is per sheet, so other sheets in the workbook keep their lines until you untick it for each one. And the next time you print or preview that sheet, Excel switches the lines back on. That's normal, not a fault. Closing and reopening the workbook usually clears them as well, until the next preview.

So treat it as a two-step habit: print or preview, then untick Show page breaks when you go back to editing. If the lines only bother you while you share your screen, switching to View > Page Layout and back to Normal doesn't help; the Options setting is the one that works.

Remove the dotted lines from every sheet at once

File > Options only changes the one sheet picked in its drop-down. On a workbook with a dozen printed sheets, a tiny macro is quicker. It only changes what's shown on screen, so it can't touch your data, page setup or print areas.

For just the sheet you're on, press Alt+F11, then Ctrl+G to open the Immediate window, type ActiveSheet.DisplayPageBreaks = False and press Enter. For every sheet in the workbook, use this six-line macro:

  • Sub HidePageBreaks()
  • Dim ws As Worksheet
  • For Each ws In ActiveWorkbook.Worksheets
  • ws.DisplayPageBreaks = False
  • Next ws
  • End Sub
  1. Press Alt+F11 to open the Visual Basic editor, then choose Insert > Module.
  2. Paste the six lines into the empty module.
  3. Click anywhere inside the macro and press F5 to run it.
  4. Close the editor. The dotted lines are gone from every worksheet.
  5. When you save, Excel warns that the macro can't be kept in an .xlsx file. Click Yes to save as a normal workbook without the macro; paste it in again whenever you need it.

3. Blue lines and "Page 1" watermarks: leave Page Break Preview

Page Break Preview is a separate view, not a setting. It shows each printed page outlined in blue, greys out anything outside the print area and writes Page 1, Page 2 across the pages. Click View > Normal, or the Normal button at the bottom right of the status bar (the first of the three view icons).

If the sheet has white gaps between pages and rulers along the edges, that's Page Layout view: View > Normal gets you out of that too. Excel remembers the view per sheet when you save, which is why a file can open straight into it.

Using Page Break Preview to fit a report on fewer pages? That's covered in how to print an Excel sheet on one page.

4. A line that stays: manual page breaks

If a line remains after you've turned off Show page breaks and you're in Normal view, check for a manual break. Someone inserted it with Page Layout > Breaks > Insert Page Break, and it shows as a solid line in Page Break Preview instead of a dashed one.

  1. To remove one: click the cell just below a horizontal break (or just right of a vertical one), then Page Layout > Breaks > Remove Page Break.
  2. To remove all of them at once: Page Layout > Breaks > Reset All Page Breaks.
  3. If a print area is set and you don't want it, Page Layout > Print Area > Clear Print Area removes that boundary too.

5. Lines that aren't page breaks at all

Three lookalikes send people hunting for the wrong setting. A moving dashed border around a range is copy mode, the "marching ants" after Ctrl+C: press Esc. A dotted line that also prints is a cell border with a dotted style: select the cells and choose Home > Borders > No Border. And faint grey lines on every cell are gridlines, which you control with View > Gridlines; see Excel gridlines not showing for the opposite problem.

A quick test: if the line moves when you change File > Print > Scaling (for example to Fit Sheet on One Page), it's a page break. If it doesn't, it's a border or gridline.

Common mistakes

Looking for the option on the Page Layout tab

Show page breaks lives in File > Options > Advanced, under Display options for this worksheet.

Turning it off for the wrong sheet

The setting has a sheet drop-down. Pick the sheet you're on before unticking.

Deleting borders to remove a page break

Page breaks aren't borders. Removing borders deletes real formatting and the dashed line stays.

FAQ

How do I get rid of the dotted lines in Excel?

If they appeared after printing or Print Preview, they're page breaks: File > Options > Advanced > untick Show page breaks. If they move like marching ants, press Esc. If they print, they're dotted borders: Home > Borders > No Border.

How do I remove the dotted page break lines from all sheets at once?

File > Options changes one sheet at a time. For the whole workbook, run a short macro that sets DisplayPageBreaks to False on each worksheet; it only changes the display, not your data or print settings.

How do I remove the dotted lines after Page Break Preview?

Going back to Normal view leaves the automatic page breaks drawn as dotted lines. Untick File > Options > Advanced > Show page breaks for that sheet. Closing and reopening the file usually clears them too, until the next preview.

Why do page break lines keep coming back in Excel?

Excel turns them back on each time you print or preview the sheet. It's expected. Untick Show page breaks again after you finish printing.

How do I remove all page breaks in Excel?

Page Layout > Breaks > Reset All Page Breaks removes every manual break. Automatic breaks can't be deleted, only hidden with Show page breaks, because they're simply where the paper ends.

Do page break lines print?

No. Page break lines are only an on-screen guide. If a dotted line appears on paper, it's a cell border.

Related guides

Updated