There’s probably some ridiculously easy answer to this that I can’t find…
I want to do a line chart of monthly attendance to various classes we offer, Jan - Dec. In May, we have numbers entered for Jan throuh April, and the line runs through those four numbers and stops, which is exactly what I want.
But there is another line I want to chart, which is the sum of those monthly numbers. If the raw numbers for May - Dec haven’t been added, the sum cells displays a ‘0’. The chart displays the real numbers for through April, then the line drops down to the ‘0’ value and charts as a zero through Dec.
If i modify the formula to an if statement, eg. =IF(SUM(a1:a10)=0,"",SUM(a1:a10)), then the cell displays nothing until the raw numbers have been entered, but the chart still charts the values as zeroes.
The only way I have found to avoid this is to chart only the numbers that have values entered, and stretch the “source data” box every month to include the next month’s entries. This is not acceptable to the person entering the data, as she is simply unwilling to learn how to modify the charted data. She wants to enter her data into the boxes, and have the charts update automatically.
So can I trick the charts to handle the data the same way? I want to chart a blank cell exactly the same as one with a value of “”. Or I want to modify the formula so a zero sum result returns some other value that the chart treats the same way as it would a blank cell.
Now #N/A displays in the cell. Is there any way to accomplish both – make the cell display blank, and chart no value for the cell? FYI, I tried another modification of the formula – using ISNA() with a nested “if” statement, so if a value of ‘#N/A’ was returned the cell would display “”. But while the formula worked, I was back to the original problem – the chart reverted to charting it as a value of zero.
Found the solution to that one myself – while you have the chart selected, click on Tools–Options-- and uncheck the bok that says to plot visible cells only.
In the future, if you have weird charting problems you can mirror the information you want in another sheet for the purposes of charting. This is also helpful when the information is not contiguous in it’s normal form. You can then hide the sheet so nobody tinkers with it accidentally.