How to erase lines in Microsoft Excel

In Microsoft Excel, erasing lines can signify the removal of either visible gridlines or rows and columns containing data. Eliminating gridlines can improve the overall presentation of the worksheet, which is especially advantageous for creating reports or presentations that require a polished appearance. It can aid in achieving a clean and professional look that enhances the readability of the data.

In this tutorial, we will learn how to erase lines in Microsoft Excel. Erasing lines in Excel can be achieved using different methods. One simple way is to utilize the “View” tab, while another option is to change the background color using the “Fill Color” feature, which can also remove the lines. Additionally, a VBA code can also be used to remove the gridlines.

Method 1: Erasing the Lines from the View Tab

Step 1 – Locate the View Tab

  • Locate the view tab in the menu bar.

Step 2 – Uncheck the Gridlines Check Box

  • Uncheck the “Gridlines” Check box present in the “Show” section of the “View” tab.
  • The lines will be erased instantly.

Method 2 – Using a VBA Code to Erase Lines

Step 1 – Locate the VISUAL BASIC Button 

  • Locate the VISUAL BASIC button in the Developer tab.

Step 2 – Insert a New Module

  • Right-click on the sheet name in the Project-VBA Project menu at the left of the window.
  • Click on Insert.
  • Click on Module

Step 3 – Utilize the VBA Code

  • Utilize the following VBA code: 
Sub RemoveGridlines()
    ActiveWindow.DisplayGridlines = False
End Sub 

Step 4 – Run the Code

  • Run the code.
  • The lines would be erased.

Method 3: Changing the Background Color

Step 1 – Select the Sheet

  • Select the sheet by clicking on the triangle above the row headers and on the left of the column headers.
  • This can also be done by pressing the CTRL+A keys.

Step 2 – Perform a Click on the Fill Color Drop-down Arrow

  • Perform a click on the Fill color drop-down arrow in the Font section of the Home tab.

Step 3 – Choose the White Color

  • Choose the white color from the drop-down menu.
  • The lines will be erased.