Skip to main content

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


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:

doc-hide-aixs-1

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

doc-hide-aixs-2

Then the axis will be hidden.

doc-hide-aixs-3

In Excel 2013

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

doc-hide-aixs-4

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

doc-hide-aixs-5

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()
'Updateby20140911
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.

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

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...

Description


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!
Comments (4)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This deletes axis, not hides it. All points linked to axis 2 move to axis 1
This comment was minimized by the moderator on the site
Just Make axis text the same color as the chart. No need for VB.
This comment was minimized by the moderator on the site
Thanx buddy it was a good idea
This comment was minimized by the moderator on the site
probably best we can do
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations