How to Remove Dotted Lines in Excel (5 Quick Ways)

Get FREE Advanced Excel Exercises with Solutions!

If you are looking for some of the easiest ways to remove dotted lines in Excel, then you are in the right place. Sometimes you may have some unwanted dotted lines in your worksheet and it may be unpleasant to you. So, to get rid of these dotted lines follow this article.

Download Workbook


5 Ways to Remove Dotted Lines in Excel

Here, we have the following data table which has some dotted lines and by using this table we will explain the ways to remove these dotted lines one by one.

remove dotted lines in Excel

We have used Microsoft Excel 365 version here; you can use any other version according to your convenience.


Method-1: To Remove Dotted Lines in Excel because of Page Break Selection 

Let’s talk about the page break lines at first, you can see these dotted lines in the following figure. This page break line indicates that the left portion of this line will be printed on one page. To remove this unwanted line from your worksheet you can follow this method.

remove dotted lines in Excel

Steps:
➤ Go to the File Tab.

page break

➤ Click on Options.

page break

Then, the Excel Options wizard will pop up.
➤ From the list of options select the Advanced one.

page break

Now, scroll through the Advanced options shown on the right side and find the Display options for this worksheet section.
➤ Unclick the Show page breaks option and press OK.

page break

Finally, you will be able to remove the page break line from your worksheet.

remove dotted lines in Excel

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


Method-2: To Remove Dotted Lines in Excel Because of Print Area Selection

For selecting a specified area of your worksheet as a print area you can see the following dotted lines which are surrounding the area to be printed. These lines are not actually the dotted lines rather they are basically some faded grey lines. But, they can be considered as dotted lines and in this section, we will remove them.

remove dotted lines in Excel

Steps:
➤ Select the area from which you want to remove these lines.
➤ Go to Page Layout Tab >> Page Setup Group >> Print Area Dropdown >> Clear Print Area Option.

print area selection

In this way, you have removed the dotted lines due to the print area selection.

print area selection

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


Method-3: To Remove Dotted Lines in Excel Because of Dotted Borders

Here, we have some dotted borders around the cells of our data table and we want to replace them with solid border lines.

remove dotted lines in Excel

Steps:
➤ Select the cells from which you want to remove the dotted lines.
➤ Go to Home Tab >> Borders Dropdown >> All Borders Option (you can select the No Border option if you don’t want any border).

dotted border

Finally, the dotted borders of our data table have been replaced with solid borders.

dotted border

Read More: How to Remove Borders in Excel (4 Quick Ways)


Similar Readings


Method-4: To Remove Dotted Lines in Excel Because of Gridlines

By default, when you open an Excel worksheet you will see some dotted (basically faded grey lines) borders covering each cell of your worksheet. If you want to remove them easily then follow this method.

remove dotted lines in Excel

Steps:
➤ Go to View Tab >> Uncheck the Gridlines Option.

gridlines

Afterward, you will be able to remove the gridlines of your sheet like below.

remove dotted lines in Excel

Read More: How to Remove Grid from Excel (6 Easy Methods)


Method-5: Using VBA Code to Remove Page Break Line

In this section, we will try to remove the page break lines by using a VBA code.

remove dotted lines in Excel

Step-01:
➤ Go to Developer Tab >> Visual Basic Option.

VBA code

Then, the Visual Basic Editor will open up.
➤ Go to Insert Tab >> Module Option.

VBA code

After that, a Module will be created.

VBA code

Step-02:
➤ Write the following code

Sub dotted1()

ActiveSheet.DisplayPageBreaks = False

End Sub

This code will hide the page break lines from the active sheet of your file.

VBA code

➤ Press F5.

After that, you will be able to remove all of the page break lines from your sheet.

remove dotted lines in Excel

For removing the page break lines from all of the sheets of your workbook you can follow this code.

Sub dotted2()

Dim sheet As Worksheet

For Each sheet In ActiveWorkbook.Worksheets
      sheet.DisplayPageBreaks = False
Next sheet

End Sub

Here, the FOR loop will go through each sheet of your workbook and hide the page break lines.

VBA code

If you want to remove the page break lines from all of the sheets from all of the opened workbooks then this code is for you.

Sub dotted3()

Dim book As Workbook
Dim sheet As Worksheet

For Each book In Workbooks
    For Each sheet In book.Worksheets
        sheet.DisplayPageBreaks = False
    Next sheet
Next book

End Sub

Here, we have declared the book as Workbook and the sheet As Worksheet. One FOR loop will go through each book and the other FOR loop will go through each sheet of your workbook and hide the page break lines.

remove dotted lines in Excel


Practice Section

For doing practice by yourself we have provided a Practice section like below in a sheet named Practice. Please do it by yourself.

practice


Conclusion

In this article, we tried to cover some of the ways to remove the dotted lines in Excel. Hope you will find it useful. If you have any suggestions or questions, feel free to share them in the comment section.


Related Articles

Tanjima Hossain

Tanjima Hossain

Hello everyone, This is Tanjima Hossain. I have completed my graduation from BUET. Then I have started working as a technical writer in SOFTEKO. I have grown interest in technical content writing, research topics, numerical analysis related field and so I am here. Besides this I love to interact with different people and I love to spend my spare time by reading, gardening ,cooking etc.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo