Solved

How to not display null values in Chart

Posted on 2013-12-24
3
265 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 500 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Office 2016 without internet 6 38
Dynamic control of Items in an Excel multiListBox 7 29
locking multiple column ranges 10 25
Request to review costing formula 3 35
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

777 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