+ Reply to Thread
Results 1 to 7 of 7

Suppressing zero values AND column axis labels in Bar charts

  1. #1
    Registered User
    Join Date
    10-02-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    8

    Suppressing zero values AND column axis labels in Bar charts

    So…..I have a very simple Excel 2010 table

    Label 1 50
    Label 2 60
    Label 3 0
    Label 4 0
    Label 5 20
    Label 6 0
    Label 7 80

    …and I want to create a very simple Bar Graph, but I want the graph to avoid plotting data *AND* the labels (Column Axis) where the data is zero.

    I’ve found ways to suppress the zero values and avoid the Label appearing, but there are still gaps in the chart corresponding to the places where the blanks are.

    Chart 2.jpg

    Is it possible to avoid the gaps while still retaining the ability to include the other Labels and their values, should they change.?

    Chart 3.jpg

    I can achieve a similar affect with a Pie chart, but it doesn't suit my needs.

    Help anyone? Thanks!

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Suppressing zero values AND column axis labels in Bar charts

    Excel chart only plot "Visible Rows". I guess one way to do it is to use autofilter to filter the non-zero labels.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-02-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    8

    Re: Suppressing zero values AND column axis labels in Bar charts

    Thanks for this....it was really helpful (and simple)

    Because of the complexity of the data and graphs I am creating, I have the data on a separate sheet to the graph.

    I have set the Filter to show anything greater than zero, and I also incorporated another tip in the form of the following code on the data tab to ensure the filter auto-updates

    Private Sub Worksheet_Activate()
    ActiveSheet.AutoFilter.ApplyFilter
    End Sub

    However.....I find I actually have to visit the Sheet where the data is located before everything updates.
    This is not actually a big issue as I have a macro that I have added a couple of lines to in order to force this, but is there a better way?

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Suppressing zero values AND column axis labels in Bar charts

    Can you attach your latest spreadsheet

  5. #5
    Registered User
    Join Date
    10-02-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    8

    Re: Suppressing zero values AND column axis labels in Bar charts

    Regrettably - no .... apart from the fact that it's huge and complex it also contains confidential information. This is a tiny part of bigger beast.

    If I can find time I'll extract a subset and post it. In the meantime I'll continue with my little workaround, I don't mind it but its not very elegant, so if anyone has any ideas, I'd appreciate some pointers.

    Thanks.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Suppressing zero values AND column axis labels in Bar charts

    You will need to construct a set of chart data that excludes zero data points and then use named ranges to define usable chart data for the series.

    I have used helper columns to make it easier to see what is happening.

    Use Name Manager to see 2 defined named ranges
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  7. #7
    Registered User
    Join Date
    10-02-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    8

    Re: Suppressing zero values AND column axis labels in Bar charts

    Thanks Andy - I've never used Name Manager but it seems it's part of the solution.

    I will dissect and incorporate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Horizontal axis labels in Bar Charts
    By jeskit in forum Excel General
    Replies: 2
    Last Post: 08-15-2011, 04:39 AM
  2. Excel charts with dates on axis labels
    By gigiw1986 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-27-2010, 09:54 PM
  3. Text X Axis Labels on Bar/Line charts (2007)
    By kolsky in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-02-2010, 12:13 AM
  4. axis labels on charts
    By rdale in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-11-2006, 08:35 AM
  5. Replies: 1
    Last Post: 01-09-2006, 03:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1