How to Remove the Page Break Lines in Excel (3 Methods)

What Are the Page Break Lines?

Page break lines divide an Excel worksheet into separate pages for printing. There are two types of page break lines:

  1. Vertical Page Break Lines: These appear between columns.
  2. Horizontal Page Break Lines: These appear between rows.

Both the page break lines are shown in the picture below:

Vertical Page Break Lines and Horizontal Page Break Lines

According to the method of insertion, the page break lines can also be of two types,

1. Automatic Page Break Lines

2. Manual Page Break Lines

The automatically inserted page break lines are dashed lines, whereas the manually inserted page break lines are solid lines. Both are shown in the picture below:

Automatic Page Break Lines and Manual Page Break Lines


Dataset Overview

We will be using a sample sales report as a data table to demonstrate all the methods to remove page break lines in Excel.

dataset for 3 Methods to Delete the Empty Cells in Excel


Method 1 – Remove Page Break Command

1.1 Remove Vertical Page Break Lines

  • Identify the vertical page break line (usually a dashed line) between columns F & G.

Remove Vertical Page Break Lines using remove page break

  • Select the column immediately to the right of the page break (column G).
  • Go to Page Layout ➡️ Breaks ➡️ Remove Page Break.

Delete the Manual Page Break Lines Using the Remove Page Break Command


1.2 Delete Horizontal Page Break Lines

  • Locate the horizontal page break line (usually a solid line) between rows 13 and 14.

Delete Horizontal Page Break Lines using remove page break command

  • Select the row just below the page break (row 14).
  • Go to Page Layout ➡️ Breaks ➡️ Remove Page Break.

usage of remove page break to delete page break lines


Method 2 – Use Advanced Options

To remove automatically inserted page break lines:

  • Click File.

file option in excel

  • Select Options.

  • Go to the Advanced section.
  • Under Display options for this workbook, uncheck Show page breaks.
  • Click OK.

Advanced Options to Remove the Automatic Page Break Lines in Excel

Read More: How to Use Page Break in Excel


Method 3 – Using VBA Code

The previous methods remove either automatic or manual page break lines, but not both. To remove both types, follow these steps:

  • Press ALT + F11 to open the VBA code editor.
  • Go to Insert ➡️ Module.

  • Copy and paste the following VBA code:
Sub RemovePageBreakLines()

ActiveSheet.DisplayPageBreaks = False

End Sub
  • Save the code.

VBA Code to Delete Any Page Break Lines in Excel

  • Return to your Excel worksheet.
  • Press ALT + F8 to open the Macro module.
  • Select the RemovePageBreakLines function.
  • Click Run.

macro module in excel

Read More: How to Remove Blue Lines in Excel


Things to Remember

  • The Remove Page Break command won’t delete automatic page break lines.
  • For both manual and automatic page break lines, use the VBA code.
  • You can access the VBA code editor with ALT + F11 and the Macro dialog box with ALT + F8.

Download the Practice Workbook

You can download the practice workbook from here:


Related Articles


<< Go Back to Page Setup | Print in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mrinmoy Roy
Mrinmoy Roy

Mrinmoy Roy, a dedicated professional with a BSc in Electronics and Communication Engineering from Khulna University of Engineering & Technology, Bangladesh, brings over two years of expertise to the ExcelDemy project. As a prolific contributor, he has authored around 180 articles, showcasing his deep knowledge and passion for Microsoft Excel, Data Analysis, and VBA. His unwavering commitment to continuous learning, combined with versatile skills, renders him well-suited for roles in data management and spreadsheet solutions. He has interest... Read Full Bio

1 Comment
  1. I was trying to do a screen-capture of a worksheet and it was really annoying to having those page-breaks being displayed.
    Thanks for this article.

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo