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.


Download the Practice Workbook

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


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


3 Methods to Delete the Empty Cells in Excel

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 Insert Page Break in Excel Between Rows


Similar Readings


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 (7 Suitable Examples)


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

The previously discussed two methods can remove either 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 Dotted Lines in Excel (5 Quick Ways)


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.


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. And please visit our website Exceldemy to explore more.


Related Articles

Mrinmoy

Mrinmoy

Hi! I'm Mrinmoy Roy. I'm an Excel and VBA content developer. I write blogs relating to Microsoft Excel on Exceldemy.com. I've completed my graduation in Electronics and Communication Engineering from Khulna University of Engineering & Technology. I've expertise in Excel functions, formulas, Pivot Table, Power Query, Visual Basic, etc. I write blogs to lessen people's hassles while working on Microsoft Excel.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo