aa:=IF(C>REF(C,1),C-REF(c,1),0); bb:=IF(C cc:=IF(c>REF(c,3),aa+REF(aa,3),0); dd:=IF(c ee:=(SUM(cc,13)-SUM(dd,13)*(-1)); Y:if(ee>=0,ee,0),Color0000FF; X:if(ee<0,ee,0),Color00FF00;