Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to add minor gridlines in an Excel chart?

Author Kelly Last modified

In Excel, gridlines play an essential role in improving the readability of charts by helping users track data points and trends more comfortably. By default, when you create a column, bar, or line chart, Excel automatically adds horizontal major gridlines to the chart area, which segment the axis into broad intervals. However, in scenarios where you need a more detailed view—such as measuring smaller changes or making your data comparison more granular—you might want to add "minor gridlines." These minor gridlines further divide the space between the major gridlines, narrowing the intervals and giving your chart a finer internal structure, as shown in the screenshot below. This article will guide you through different ways to add minor gridlines to a chart in Excel, and when and why you might want to use these options.

add minor gridlines in chart


Add minor gridlines in an Excel chart

Suppose you have already created a line chart that displays only major horizontal gridlines, as shown in the screenshot below. If your dataset contains closely spaced values or if you want to enhance the visual granularity of your graph, adding minor gridlines to your chart is a handy approach. Minor gridlines provide more reference points, making it easier for you and viewers to estimate values between the main axis intervals.

create a sample chart

1. First, select the chart by clicking anywhere within its area to activate Chart Tools. Then go to Chart Tools > Design in the Ribbon. Click Add Chart Element, point to Gridlines, and click Primary Major Horizontal to remove the existing major gridlines. This prevents your chart from appearing cluttered with both major and minor gridlines.
click Primary Major Horizontal to remove the original gridlines

2. With the chart still selected, again go to Chart Tools > Design > Add Chart Element > Gridlines, then choose Primary Minor Horizontal. This adds the finer minor gridlines across the chart area.
go on clicking Primary Minor Horizontal

Note: If you are using Excel 2010, the steps are slightly different. After selecting the chart, go to Chart Tools > Layout, then click Gridlines > Primary Horizontal Gridlines > Minor Gridlines.

After completing these steps, your chart will display minor horizontal gridlines, which help to interpret closely varying data or provide finer measurement intervals. To further customize these gridlines (e.g., color, transparency, line style), right-click the gridlines and choose Format Gridlines. In the format pane, you'll find various customization options to improve visual clarity.

the minor horizontal gridlines are added in chart

Tips and Considerations:
  • Minor gridlines can be added horizontally and vertically, depending on your chart type and axis setup.
  • Remove major gridlines first if they make the chart too busy alongside minor ones.
  • If you change chart type, axis scale, or number formatting later, you may need to reconfigure gridlines.
  • Not all charts support minor gridlines (e.g., pie charts do not).
Troubleshooting:
  • Ensure a supported chart type is selected (e.g., line, column, or bar chart).
  • If the option is grayed out, click the chart again to confirm it's selected.
  • Restart Excel or recreate the chart if options remain unavailable.

Minor gridlines enhance chart readability—use them wisely for best clarity and viewer experience.

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

VBA: Add or customize minor gridlines programmatically

In cases where you need to apply minor gridlines repeatedly or across multiple charts within a workbook, using VBA (Visual Basic for Applications) is a practical solution. This approach is especially helpful for automating chart formatting tasks in large reports or for ensuring consistent styling across charts created dynamically.

VBA allows you not only to add minor gridlines but also to further customize their appearance—such as color, thickness, or line style—and apply these settings to all charts within your workbook. Follow the steps below:

1. Open your workbook. Go to Developer > Visual Basic to launch the VBA editor. Then click Insert > Module and paste the following code into the new module. (If the Developer tab is not visible, enable it via File > Options > Customize Ribbon.)

Sub AddMinorGridlinesToAllCharts()
    Dim ws As Worksheet
    Dim chtObj As ChartObject
    Dim xTitleId As String
    xTitleId = "Kutools for Excel"
    On Error Resume Next
    For Each ws In ActiveWorkbook.Worksheets
        For Each chtObj In ws.ChartObjects
            With chtObj.Chart
                If .HasAxis(xlValue) Then
                    With .Axes(xlValue)
                        .HasMinorGridlines = True
                        If .HasMinorGridlines Then
                            With .MinorGridlines.Format.Line
                                .Weight = 1
                                .ForeColor.RGB = RGB(200, 200, 200)
                                .DashStyle = msoLineDash
                            End With
                        End If
                    End With
                End If
            End With
        Next chtObj
    Next ws
    On Error GoTo 0
    MsgBox "Done: Minor gridlines have been applied to all charts.", vbInformation, xTitleId
End Sub

2. After entering the code, close the VBA editor. Press Alt + F8, choose AddMinorGridlinesToAllCharts from the macro list, and click Run. (Alternatively, you can press F5 in the VBA editor with the cursor placed inside the macro.)

This macro will loop through all worksheets in the current workbook and apply minor gridlines to each chart’s primary vertical (Y) axis.

Notes and Tips:
  • To apply minor gridlines to selected charts only, modify the loop logic to target specific chart objects.
  • You can adjust line color, dash style, or thickness in the VBA code to match your design or brand guidelines.
  • If you encounter a “Method not supported” error, the chart type may not support minor gridlines. Use only with line, column, or bar charts.
  • Always save your workbook before running the macro, especially if it modifies multiple charts at once.
  • To remove minor gridlines later, change .HasMinorGridlines = True to False in the same code.

This VBA method is especially effective when you need to update many charts at once and want to ensure consistent visual formatting throughout your workbook.


Related articles:

Create a bell curve chart template in Excel

Break chart axis in Excel

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in