Ignoring zeros and non-numeric data in a chart

ajcolyer

New Member
Joined
Jan 23, 2005
Messages
19
How can I make an excel 2007 graph ignore data that equals zero or is non-numeric? I am plotting stock prices, but am pulling in the data from elsewhere. Where the graph dates start before the company traded, the data shows as a zero. I want to avoid having the graph spike from zero to the trading amount on the first data of trading (i.e., it shows a vertical line now, with lines at zero prior to trading). Thanks.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
If the cells are truly empty (i.e., no value, no formula, no nothing), Excel will not plot those cells.

So, your best bet would be to simply select those cells and hit the Delete key.

If you cannot do that, replace the existing formula with something that yields NA() -- it will show up as #N/A -- whenever there is no data to be shown.
 
Upvote 0
Try AutoFiltering your data for non zero. Excel should plot only the visible cells if that is is selected in Chart options.
 
Upvote 0
Entering the na() formula works for a basic chart. I am running into a problem with a combo chart and the line not showing zeros or #N/A values as 0 but ignoring them. Any thoughts on how to get a combo chart to ignore zeros or non-numeric data points?

This picture shows a simple example:

Capture_zps1687f271.png




If the cells are truly empty (i.e., no value, no formula, no nothing), Excel will not plot those cells.

So, your best bet would be to simply select those cells and hit the Delete key.

If you cannot do that, replace the existing formula with something that yields NA() -- it will show up as #N/A -- whenever there is no data to be shown.
 
Last edited:
Upvote 0
I figured it out. The setting on "Select Data" --> Hidden and Empty Cell Settings --> Show empty Cells as Gaps needs to be selected. The line chart type then needs to be a "Line" rather than a "Stacked Line with Markers." This will do the trick.
 
Upvote 0

Forum statistics

Threads
1,225,842
Messages
6,187,334
Members
453,416
Latest member
JSmith0827

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top