How to Remove Print Lines in Excel (4 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

While working in excel, print gridlines are shown sometimes when you return to the normal view from the page break preview or page layout view. This is somewhat annoying in some cases. Excel has some features by which you can easily remove those print lines. Today, in this article, we will discuss some possible ways to remove print lines in Excel.


How to Remove Print Lines in Excel: 4 Easy Ways

Consider a situation where you are to print your dataset and you are having some dotted lined borders. These are actually page break lines that show how much of the worksheet will be printed on a single paper. We need to remove those lines. We will discuss four different ways to remove those print lines.

Disable the Page Break Option to Remove Print Lines in Excel


1. Disable the Page Break Option to Remove Print Lines in Excel

Step 1:

  • To remove print lines from your worksheets, click on Files.

Disable the Page Break Option to Remove Print Lines in Excel

  • Now click on Options to open available options.

Disable the Page Break Option to Remove Print Lines in Excel

Step 2:

  • Click on Advanced to open available advanced options.

Disable the Page Break Option to Remove Print Lines in Excel

  • Drag down to Display Options For These Worksheets. Here, check out the Show Page Breaks. Ok to confirm.

Disable the Page Break Option to Remove Print Lines in Excel

  • We have successfully removed those print lines!

Read More: How to Remove Blue Lines in Excel


2. Modify Border Style to Delete Print Lines in Excel

Sometimes you may need to remove dotted border lines from your worksheets. To do this, follow these steps.

Modify Border Style to Delete Print Lines in Excel

Step 1:

  • Select the whole dataset and click on the Border Option to open it.

Modify Border Style to Delete Print Lines in Excel

  • When the border option is opened you can select All Borders or No Borders to remove those dotted lines.

That’s how you can modify your border style.

Read More: How to Remove the Page Break Lines in Excel


3. Turn off the Gridlines to Erase Print Lines in Excel

You can easily remove your worksheet gridlines to get a better print result. Follow these steps to learn.

Step 1:

  • To remove gridlines, go to the View Tab. In this tab, you will see that the gridlines option is checked in.

Turn off the Gridlines to Erase Print Lines in Excel

  • Uncheck this option to remove your worksheet gridlines.


4. Run a VBA Code to Remove Print Lines in Excel

You can create a VBA macro code to remove print lines so that you don’t have to go through the Options every time. The instructions are given below.

Step 1:

  • Press Ctrl+F11 to open the VBA editor.

Run a VBA Code to Remove Print Lines in Excel

  • After the VBA window opens, click on Insert and click on the module to open a module.

Run a VBA Code to Remove Print Lines in Excel

Step 2:

  • Now write down the VBA code. We have given the code below you can just copy-paste the code to use it.

The code is,

Sub TogglePageBreaks()
ActiveSheet.DisplayPageBreaks = False
End Sub

Run a VBA Code to Remove Print Lines in Excel

  • Run the code and our job is done. The print lines are now removed automatically.

Read More: How to Insert Page Break Based on Cell Value with Excel VBA


Things to Remember

👉 This only works on the current worksheet. If you want to hide the print preview lines on other worksheets, you will have to do that separately for each one.


Download Practice Workbook

Download this practice book to exercise the task while you are reading this article.


Conclusion

Four separate ways to remove print lines in Excel are discussed here. Hope this article proves useful to you. If you have any thoughts regarding this article, you are most welcome to share your thoughts in the comment section.


Reading Articles


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

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Asikul Himel
Asikul Himel

Asikul Islam Himel, holding a BSc in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology, has contributed over two years to the ExcelDemy project. Starting as an Excel & VBA Content Developer, now he manages projects at You Have Got This Math Project. He wrote 60+ articles for ExcelDemy, reviewed 500+, and focused on quality maintenance. Currently, his responsibilities include project management and team leadership. Himel's interests encompass data analysis, leadership, WordPress applications, and... Read Full Bio

2 Comments
  1. In Lotus 123 when you want to omit 1 line or more not to Print you put this marks in the first columm || @if(b5=0,”||”,b5) if this cell is zero it will not print this line when it is in the first columm of the printing range

    Can that be done in Excel?

  2. Hi DAVID,
    I hope you are doing well.
    In Excel, you cannot do so as far as I know. However, you can make the fill color same as the background color to technically avoid printing the row.
    And you can also hide specific rows and columns to not print them.
    Thank you. Have a good day.

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo