Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to hide or show chart axis in Excel?

Maybe in some cases, you will want to hide the chart axis in Excel. This tutorial will tell you how to hide or show chart axis in Excel.

Hide or show chart axis in Excel

Hide or show chart axis with VBA

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately. 60-day Unlimited Free Trial

arrow blue right bubble Hide or show chart axis in Excel

In Excel 2007/2010

1. Click the chart to show Chart Tools in the Ribbon, then click Layout > Axes. See screenshot:


2. In Axes list, select the axis you want to hide, and then click None. See screenshot:


Then the axis will be hidden.


In Excel 2013

1. Click the chart to show Chart Tools in the Ribbon, then click Design > Add Chart Element. See screenshot:


2. In the list, click Axes, and then select the axis you want to hide.


Then the axis will be hidden.

arrow blue right bubble Remove chart axis with VBA

If you are interested in VBA code, you can use the follow code to remove the axis.

1. Select a chart and hold on Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Then click Insert > Module to insert a Module window, and then copy the following VBA into it.

VBA: Remove X axis from chart.

Sub XLabelHidden()
Dim xChart As Chart
Dim xChartArea As ChartArea
If VBA.TypeName(Application.Selection) = "ChartArea" Then
    Set xChartArea = Application.Selection
    Set xChart = xChartArea.Parent
    With xChart.Axes(XlAxisType.xlCategory).TickLabels.Font
        .ColorIndex = 2
        .Background = xlTransparent
    End With
End If
End Sub

3. Click Run or press F5 to run the code. Then the selected chart’s X axis is removed.

Note: This VBA code only works on removing X axis, and the removed axis cannot be shown again.

Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for you.

  • Designed for 1500+ work scenarios, helps you solve 80% Excel problems.
  • Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  • Being used by 110,000 elites and 300+ well-known companies.

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    dasf · 4 months ago
    This deletes axis, not hides it. All points linked to axis 2 move to axis 1
  • To post as a guest, your comment is unpublished.
    sam · 3 years ago
    Just Make axis text the same color as the chart. No need for VB.