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.
1. Disable the Page Break Option to Remove Print Lines in Excel
Step 1:
- To remove print lines from your worksheets, click on Files.
- Now click on Options to open available options.
Step 2:
- Click on Advanced to open available advanced options.
- Drag down to Display Options For These Worksheets. Here, check out the Show Page Breaks. Ok to confirm.
- 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.
Step 1:
- Select the whole dataset and click on the Border Option to open it.
- 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.
- 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.
- After the VBA window opens, click on Insert and click on the module to open a module.
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 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.
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?
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.