![]() |
How to ignore zero values when plotting a graph
Using Excel 2003. I have a data range for a graph. The values in the cells
are the results of a simple If function - If(m280,n28,0). The results are taken from a larger data input exercise. But, the graph line (a simple graph!) plots the FALSE value (0) when I would like there to really be no value & hence no plotted point if the result is FALSE. |
Answer: How to ignore zero values when plotting a graph
To ignore zero values when plotting a graph in Excel 2003, you can follow these steps:
This custom number format will display positive values as usual, but negative values will be displayed as blank cells. This means that any data points with a value of 0 will not be displayed on the chart. Alternatively, you can modify your original formula to return a blank cell instead of 0 when the result is false. To do this, you can use the following formula: Formula:
|
Phil -
Change this: If(m280,n28,0) to this: If(m280,n28,NA()) This results in the ugly #N/A error in the cell, but it makes the chart ignore the point. Debra Dalgleish shows how to hide the ugliness with conditional formatting: http://contextures.com/xlCondFormat03.html#Errors - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Phil Lavis wrote: Using Excel 2003. I have a data range for a graph. The values in the cells are the results of a simple If function - If(m280,n28,0). The results are taken from a larger data input exercise. But, the graph line (a simple graph!) plots the FALSE value (0) when I would like there to really be no value & hence no plotted point if the result is FALSE. |
Hi Jon,
Using a standard line chart, I seem to be getting an interpolated value with NA() as opposed to a gap in the line. Could I be missing a setting somewhere? For example, my original data is on the left side below and charted data is on the right. Assuming a blank column between the two sets with the data starting in cell A1, I've added this formula to cell E1 and copied down the column: =IF(B10,B1,NA()) a 6 a 6 b 4 b 4 c 0 c #N/A d 5 d 5 e 0 e #N/A f 3 f 3 Excel seems to interpolate the line in column E rather than leaving a gap. Tushar Mehta has this information on his site - does this still apply? http://www.tushar-mehta.com/excel/so...discontinuity/ Thanks. John Mansfield "Jon Peltier" wrote: Phil - Change this: If(m280,n28,0) to this: If(m280,n28,NA()) This results in the ugly #N/A error in the cell, but it makes the chart ignore the point. Debra Dalgleish shows how to hide the ugliness with conditional formatting: http://contextures.com/xlCondFormat03.html#Errors - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Phil Lavis wrote: Using Excel 2003. I have a data range for a graph. The values in the cells are the results of a simple If function - If(m280,n28,0). The results are taken from a larger data input exercise. But, the graph line (a simple graph!) plots the FALSE value (0) when I would like there to really be no value & hence no plotted point if the result is FALSE. |
All times are GMT +1. The time now is 06:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com