+ Reply to Thread
Results 1 to 9 of 9

How Do I remove Graph Labels for 0 Values

  1. #1
    Registered User
    Join Date
    08-25-2023
    Location
    Port Moody, BC
    MS-Off Ver
    365
    Posts
    4

    How Do I remove Graph Labels for 0 Values

    Hi,

    I am trying to limit the labeling of the pie chart to non-zero values. Additionally, I only want the headings of the non-zero values shown. Right now, I can either show the non-zero values and no headings (almost perfect), or it shows all the headings even with non-zero values.

    The sample pie chart is simplified but designed to replicate a larger dynamic model I am currently updating.


    I appreciate your time in helping me solve this problem!
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: How Do I remove Graph Labels for 0 Values

    You could change column H to a formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: How Do I remove Graph Labels for 0 Values

    You could also Format the Data Labels and change the separator to space. Not perfect but, combined with the formula, not far away. You'll still see the shape and the colour associated with the blank label/data. The only way to get rid of it completely is to untick the box in the Select Data | Horizontal Axis Labels.

    You could probably do that with a VBA event handler.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: How Do I remove Graph Labels for 0 Values

    Just realised you're using 365, so, better idea. Scrap the previous suggestions. Don't bother with that formula and don't change the separator and no VBA required.

    Clear all the current Graph data area and use the (single) formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    That will select the required columns (Name + selected data column) and filter on non zero values.

  5. #5
    Registered User
    Join Date
    08-25-2023
    Location
    Port Moody, BC
    MS-Off Ver
    365
    Posts
    4

    Re: How Do I remove Graph Labels for 0 Values

    This suggestion is brilliant! Thank you so much!

    I really appreciate your time Trevor!

    As a side question, do you have any free places you recommend for getting help with VBA code? Not just on for this issue, but in general?

  6. #6
    Registered User
    Join Date
    08-25-2023
    Location
    Port Moody, BC
    MS-Off Ver
    365
    Posts
    4

    Re: How Do I remove Graph Labels for 0 Values

    I just saw your third comment about one big formula to get the job done.

    Which cell do I paste this formula in?

    IS there a way for you to post that spreadsheet back with the formula?

  7. #7
    Registered User
    Join Date
    08-25-2023
    Location
    Port Moody, BC
    MS-Off Ver
    365
    Posts
    4

    Re: How Do I remove Graph Labels for 0 Values

    It actually worked for me the formula you had. Wow, what a great formula!

    I will have to review this one to understand exactly how it does it all, but really appreciate the great workaround you found for me!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: How Do I remove Graph Labels for 0 Values

    You're welcome.

    Here's the updated file.



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Attached Files Attached Files

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: How Do I remove Graph Labels for 0 Values

    See: https://www.excelforum.com/excel-pro...materials.html

    But Google and this forum (other forums/fora are available, but we don't talk about them) are your friends.

+ 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. Replies: 2
    Last Post: 10-19-2015, 02:59 AM
  2. Pie Chart - Do not graph 0 values or do not include labels
    By LJenny in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 10-14-2015, 03:44 AM
  3. [SOLVED] Need graph to show alphanumeric values as Y axis labels with Date as Z axis labels
    By Ochimus in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-24-2015, 08:40 PM
  4. Replies: 3
    Last Post: 05-05-2015, 02:07 AM
  5. Replies: 2
    Last Post: 04-05-2014, 06:46 PM
  6. Hide Labels with zero values in a Graph
    By Taislin in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-08-2013, 01:45 PM
  7. Replies: 0
    Last Post: 06-15-2012, 03:23 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