How to Remove Gridlines from an Excel Graph – 5 Methods

 

What Are Gridlines in an Excel Graph?

Gridlines are lines that span the chart plot and indicate axis divisions.


The sample dataset showcases a company’s monthly revenue over 9 month.

5 Methods to Remove Gridlines in Excel Graph

To create a graph:

  • Go to Insert > Charts.

To remove the gridlines from the graph:

5 Methods to Remove Gridlines in Excel Graph


Method 1 – Using the Delete Key or Delete Option to Remove the Gridlines from the Graph

STEPS:

  • Select any gridlines by clicking one of them (except the first one).
  • Right-click and press Delete.

  • You can also select the Vertical (Value) Axis Major Gridlines and press Delete.

Use Delete Key or Delete Option to Remove Gridlines from Graph 

  • To remove the horizontal gridlines, click the Horizontal (Value) Axis Major Gridlines and press Delete.

Use Delete Key or Delete Option to Remove Gridlines from Graph 

This is the output.

Use Delete Key or Delete Option to Remove Gridlines from Graph 

Read More: How to Add Vertical Gridlines to Excel Chart 


Method 2 – Clearing Gridlines from a Graph using the Quick Layout Option in Excel

STEPS:

  • Click the graph and go to Chart Design.
  • In Chart Layouts, click Quick Layout.
  • Select a layout that does not contain gridlines. Here, Layout 4.

This is the output.


Method 3 – Delete Gridlines using the Chart Elements

STEPS:

  • Click the graph and go to Chart Design.
  • Click Add Chart Element in Chart Layouts.
  • Click the Gridlines and select Primary Major Horizontal or Primary Major Vertical.

  • You can also click the Plus (+) sign: Chart Elements.
  • Uncheck Gridlines or Primary Major Horizontal or Primary Major Vertical.

Delete Gridlines from Excel Graph with Chart Element

This is the output.

Delete Gridlines from Excel Graph with Chart Element


Method 4 – Using the Format Gridlines Feature to Remove the Gridlines from an Excel Graph

STEPS:

  • Click any gridline and right-click.
  • Select Format Gridlines.

Format Gridlines Feature to Remove Gridlines from Excel Graph

  • Choose No line to remove all gridlines.

Format Gridlines Feature to Remove Gridlines from Excel Graph

This is the output.


Method 5 – Using Excel VBA to Remove the Gridlines from an Excel Graph

Use Excel VBA.

STEPS:

  • Go to the Developer tab.
  • In Code, click Visual Basic to open the Visual Basic Editor.

  • You can also press Alt + F11 to open the Visual Basic Editor or right-click the worksheet and go to View Code.

  • Click Module in Insert.

 

  • Enter the VBA code below.

VBA Code:

Sub Remove_Gridlines()
Dim a As Axes
Dim wsht As Worksheet
Dim ChtObj As ChartObject
For Each wsht In Worksheets
    wsht.Activate
        For Each ChtObj In wsht.ChartObjects
            With ChtObj.Chart
                For Each a In ChtObj.Chart
                    .Axes.HasMajorGridlines = False
                    .Axes.HasMinorGridlines = False
                Next a
            End With
        Next ChtObj
Next wsht
End Sub
  • Run the code by clicking  RubSub or pressing F5.

This is the output.


Download Practice Workbook

Download the workbook and practice.


Related Articles


<< Go Back To Gridlines in Excel Chart | Excel Chart Elements | Excel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sabrina Ayon
Sabrina Ayon

Sabrina Ayon, a Computer Science and Engineering graduate from United International University, has been an integral part of the ExcelDemy project for two years. She authored 150+ articles, excelling in instructing through visually engaging Excel tutorials. With a passion for teaching, Sabrina conducted sessions on Excel VBA, sharing her knowledge and insights with others. Currently holding the position of Project Manager for the ExcelDemy Visual Development Project, she oversees various aspects of the project, ensuring its smooth operation... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo