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

In Excel, the page break lines are dividers that split a worksheet into multiple pages for the sake of printing. These page breaks are automatic that is set based on the paper size, margin settings, scale options, and the positions of any manual page break that you insert. Once you insert those page breaks, you may face difficulties to remove them from the worksheet. In this regard, we’ve come up with 3 distinct ways that you can use to remove page break lines in Excel with ease.


What Are the Page Break Lines?

The Page Break Lines are basically dashed/solid lines that are to divide an Excel worksheet into multiple pages to print them separately. The page break lines  can be of two types:

1. Vertical Page Break Lines

2. Horizontal Page Break Lines

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


Remove Page Break Lines in Excel: 3 Easy Methods

We will be using a sample sales report as a data table to demonstrate all the methods to remove page break lines in Excel. Now, let’s have a sneak peek of the data table:

dataset for 3 Methods to Delete the Empty Cells in Excel

So, without having any further discussion let’s get into all the methods one by one.


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

As the page break lines can be of two types, we will see how to remove each of the types of page break lines one after another.

1.1 Remove Vertical Page Break Lines

In the picture below, we can see that the vertical page break line is in between columns F & G.

Remove Vertical Page Break Lines using remove page break

To delete the vertical page break line,

❶ Select the column right after the page break line, which is G in this case.

❷ Go to Page Layout ▶ Breaks ▶ Remove Page Break.

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

That’s it.


1.2 Delete Horizontal Page Break Lines

In the picture below, the horizontal page break line is in between rows number 13 and 14.

Delete Horizontal Page Break Lines using remove page break command

To delete the horizontal page break line,

❶ Select the row just below the page break line, which is 14 in this case.

❷ Go to Page Layout ▶ Breaks ▶ Remove Page Break.

usage of remove page break to delete page break lines

That’s it.

Read More: How to Move Page Breaks in Excel


2. Use Advanced Options to Remove the Automatic Page Break Lines in Excel

To remove the automatically inserted page break lines,

❶ Go to File.

file option in excel

❷ Click on Options.

❸ Go to Advanced.

❹ Under the Display options for this workbook uncheck the Show page breaks.

❺ Finally, hit the Ok command.

Advanced Options to Remove the Automatic Page Break Lines in Excel

That’s it.

Read More: How to Use Page Break in Excel


3. Delete Any Page Break Lines in Excel Using VBA Code

The previously discussed two methods can remove the automatic page break lines or the manual page break lines. But no any of the two above methods can remove both the automatic and manual page break lines.

In this regard, you can use the following VBA code to remove both the automatic as well as manual page break lines in Excel. To see how to use this code, follow the steps below:

❶ Press ALT + F11 to open up the VBA code editor.

❷ Go to Insert ▶ Module.

❸ Now, copy the following VBA code:

Sub RemovePageBreakLines()

ActiveSheet.DisplayPageBreaks = False

End Sub

❹ After the paste the code in the VBA editor and save it.

VBA Code to Delete Any Page Break Lines in Excel

❺ Now, go back to your Excel worksheet.

❻ Press ALT + F8 to open up the Macro module.

❼ Select the RemovePageBreakLines function.

❽ Hit the Run command.

macro module in excel

That’s it.

Read More: How to Remove Blue Lines in Excel


Things to Remember

📌 You can’t use the remove Page Break command to delete the automatic page break lines.

📌 To delete both the manual and automatic page break lines, you can use the VBA code.

📌 Press ALT + F11 to open up the VBA code editor.

📌 You can press ALT + F8 to open up the Macro dialog box.


Download the Practice Workbook

You are recommended to download the Excel file and practice along with it.


Conclusion

To sum up, we have discussed 3 methods to remove the page break lines in Excel. You are recommended to download the practice workbook attached along with this article and practice all the methods with that. And don’t hesitate to ask any questions in the comment section below. We will try to respond to all the relevant queries asap.


Related Articles


<< Go Back to Page Break | 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