This makes a bar chart okay
But not such a good area chart
We can create a table that splits the positive and negative values
but the result is disappointing
The areas simply go to zero at the next value, which is not what we want. This happens even when the Excel Time-scale X axis type is selected by going to Chart..Chart Options..Axes and selecting "Time-scale". However, Time-scale has one feature that lets us easily fix the problem. Unlike the ordinary category axis, it does not present values in the same order as they appear in the table, but in strict time order. So if we make a new set of rows below our first set
where the formulae are (left to right, assuming the original table header started at cell A1)
=IF($A2*$A3>0,NA(),$A2)
=IF($A2*$A3>0,NA(),$B2+($B3-$B2)*$A2/($A2-$A3))
=IF($A2*$A3>0,NA(),0)
=IF($A2*$A3>0,NA(),0)
then the two areas should meet the zero line at the same interpolated date!
Remember, this only works if you've selected the "Time-scale" option in Chart Options. If you're looking for more Excel help, see the Jon Peltier and Andy Pope links on the right.
3 comments:
I've worked out a nearly identical protocol, but your post has beaten mine, which won't hit the airwaves until probably Monday. So I've had to rewrite my intro, giving you credit for being first to post.
Note that in addition to choosing the time scale or date scale category axis option, you also have to format the axis scale so that it uses days, not months, for the base unit.
Ah. That'll be what was responsible for a subtle but niggling bend in the straight line. I couldn't get it to become a gross break, but I couldn't get it to go away, either.
Post a Comment