ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Exclude zeros from series (https://www.excelbanter.com/charts-charting-excel/162028-exclude-zeros-series.html)

Arch Stanton

Exclude zeros from series
 
I am using VBA in Excel 2003 to create charts using columns of data on a
spreadsheet as the chart source.

I have a dataset of numbers that range in the hundreds, but occasionally
one of the data points is zero. When I plot my data, the zero values
make my data plot take occasional dips down to the X axis, which looks
peculiar and distracts my users. I don't need the zero-value data; those
data points are useless to my users. Is there any way to tell VBA to use
ranges of data for the source of a chart but to ignore zero values?

I checked this thread for this question, and I guess I can use the =NA()
function, but I don't want that to appear on my spreadsheet (my users
won't know that's a zero value).

Thanks for any help.

Bernard Liengme

Exclude zeros from series
 
Two points
1) In Tolls | Option Charts there is an setting for how missing data is to
be treated fro the currently selected chart.
2) You could use Conditional Formatting to hide #N/A but making the font the
same colour as the cell background
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Arch Stanton" wrote in message
. ..
I am using VBA in Excel 2003 to create charts using columns of data on a
spreadsheet as the chart source.

I have a dataset of numbers that range in the hundreds, but occasionally
one of the data points is zero. When I plot my data, the zero values make
my data plot take occasional dips down to the X axis, which looks peculiar
and distracts my users. I don't need the zero-value data; those data
points are useless to my users. Is there any way to tell VBA to use ranges
of data for the source of a chart but to ignore zero values?

I checked this thread for this question, and I guess I can use the =NA()
function, but I don't want that to appear on my spreadsheet (my users
won't know that's a zero value).

Thanks for any help.




Arch Stanton

Exclude zeros from series
 

A perfect solution to my problem less than ten minutes after I asked.
Thanks, my friend!

AS

Bernard Liengme wrote:
Two points
1) In Tolls | Option Charts there is an setting for how missing data is to
be treated fro the currently selected chart.
2) You could use Conditional Formatting to hide #N/A but making the font the
same colour as the cell background
best wishes



All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com