Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to not display null values in Chart

Posted on 2013-12-24
3
Medium Priority
?
286 Views
Last Modified: 2013-12-26
I want my chart to not display values if there isn't any data (or a zero, or na()) within the cell.

Excel sheet and screen shot attached for further explanation.
ExpExchange-Question.png
ExpExchange-Question.xlsx
0
Comment
Question by:lizziesmalls23
3 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 39738598
I suggest that you use either Tables or dynamic named ranges as the source of your data. Either one will grow (or shrink) with the amount of data.

On one tab, I created two named ranges: Dates and Values using these Refers to formulas:
='Using dynamic named ranges'!$B$3:INDEX('Using dynamic named ranges'!$B$3:$B$100,COUNT('Using dynamic named ranges'!$B$3:$B$100))
=OFFSET(Dates,0,1)

I then clicked on one of the columns and then changed the resulting series formula for your chart to:
=SERIES('Using dynamic named ranges'!$C$2,'ExpExchange-QuestionQ28325281.xlsx'!Dates,'ExpExchange-QuestionQ28325281.xlsx'!Values,1)
Note the use of the workbook name to qualify the named ranges (instead of the worksheet).

On the other tab, I used a Table. Charts built from a Table will automatically grow and shrink as you add data.
ExpExchange-QuestionQ28325281.xlsx
0
 
LVL 23

Expert Comment

by:Danny Child
ID: 39738787
This kind of thing comes up more often with line charts - often used to display trends over time, but they can commonly have a datapoint missing in the sequence.

If this is the case, r-clicking the chart.. choose Select Data... and then click the Hidden And Empty Cells button.  Then, choose Connect Data Points With Line.
note, this only works on Line charts, not Stacked Line.
you also may need to ensure that zero values are actually entered as =NA()
If you don't want to enter these values, use a helper cell with this formula:
=IF(C4>0,C4,NA())
 - and then plot the chart on the results of the helper formula.

This works better with giving a smooth trend line for the chart, but won't deal with the issue as fixed by Byundt's suggestion where you're removing the empty white space from the right hand side of the chart.
0
 

Author Closing Comment

by:lizziesmalls23
ID: 39740200
Great explanation and thank you for the worksheet -- it fully solved my issue, appreciate that.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question