Solved

How to not display null values in Chart

Posted on 2013-12-24
3
262 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 80

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:DanCh99
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

757 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now