+ Reply to Thread
Results 1 to 9 of 9

Graphing: Show zero values but omit values that are blank in the chart

  1. #1
    Registered User
    Join Date
    02-06-2018
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    4

    Graphing: Show zero values but omit values that are blank in the chart

    I have a chart that feeds into a graph to plot and in this chart I have #s, zeros, and NA's.

    In the graph, I want to show values of zeros, NA's and #s, but when I click "show values", excel automatically assumes that blank cells have a value of zero and labels zero for all cells that are empty as well. Instead of omitting certain values from showing, I want to show all values that are present in the chart and omit blanks cells (values that are yet to be entered) from showing values in the graph.

    Any advice?

    Thank you in advance.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: Graphing: Show zero values but omit values that are blank in the chart

    It will depend on chart type, I expect. Here's a good starting place: https://peltiertech.com/mind-the-gap...g-empty-cells/
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    02-06-2018
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    4

    Re: Graphing: Show zero values but omit values that are blank in the chart

    Im using a bar graph.

    It seems like there's no way to show zeros that are manually input in the chart and omit zeros that are assumed from blank cells.
    It either shows all zeros or omits all zeros.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,409

    Re: Graphing: Show zero values but omit values that are blank in the chart

    Change the source data to distinguish between 0 and blank cells - maybe change formulae to return N/A instead of blank?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    02-06-2018
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    4

    Re: Graphing: Show zero values but omit values that are blank in the chart

    i changed it to return NA() but now its showing #N/A as values instead of zeros.

    is there a way to omit #N/A values from showing as well?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,409

    Re: Graphing: Show zero values but omit values that are blank in the chart

    Attach the workbook - let's have a look at what's going on.

  7. #7
    Registered User
    Join Date
    02-06-2018
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    4

    Re: Graphing: Show zero values but omit values that are blank in the chart

    Please see attached
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: Graphing: Show zero values but omit values that are blank in the chart

    As explained in Peltier's link, the "best" approach for column/bar charts is to
    Quote Originally Posted by Jon Peltier
    For these chart types it would be better to use “” or even zero, and apply a custom number format that suppresses the display of zeros (a format like “0;-0;;”).
    . The problem in your example is that you have real 0 values in addition to empty values, and this approach will not distinguish between "real 0 value" and "0 that is a text string empty cell placeholder". Do you need to be able to handle those 0 values, or are they just placeholders where 0 is not really an expected result? If 0 is not an expected result, then that might be a good place to start.

    If you must be able to handle real 0 values, this might be a case like he describes:
    Quote Originally Posted by Jon Peltier
    Alternatively you could rely on VBA to clear cells which need to be cleared, but this routine would have to run every time the data range is changed, and it would have to reintroduce formulas into previously cleared cells as well as clear cells where blanks are needed. Or it could do all of the calculations in VBA, eliminating the worksheet formulas.
    Or perhaps this is a case where you think through what you are doing and do something completely different.

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: Graphing: Show zero values but omit values that are blank in the chart

    It occurred to me after the previous post that the columns Y:AB might populate from top to bottom, where the blank cells you need the chart to ignore are always at the "bottom" of the range. If this is the case, then a "dynamic named range" for the axis series might be a suitable approach http://www.criticaltosuccess.com/dyn...-named-ranges/

+ 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. [SOLVED] Show Values When All 'Before Blank' Cells Are Empty
    By vill in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2017, 01:26 PM
  2. Replies: 1
    Last Post: 07-25-2015, 07:23 AM
  3. Pie Chart Help - I Want To Hide Values/Use Values But Not Show In Chart
    By RandomlySet in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-17-2013, 12:54 PM
  4. Replies: 2
    Last Post: 03-01-2011, 05:13 PM
  5. How to omit date ranges while graphing
    By mufan in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-10-2008, 06:19 AM
  6. Replies: 3
    Last Post: 08-02-2005, 06:05 PM
  7. How to omit data in a chart when there are error values?
    By Bou in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-10-2005, 04:05 PM

Tags for this Thread

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