Advertisement

**Not a member of Pastebin yet?**

**, it unlocks many cool features!**

__Sign Up__- RE: http://chandoo.org/wp/2011/11/11/calculate-payment-schedule-homework/
- Start by seeing the difference between the total earned and the total paid. Then see if there are six preceeding days of zero paid. (Added error checking when you start with less than 7 rows above).
- Fixed version:
- =IF(SUM(C$6:C6)-SUM(D$5:D5)>200,IF(ISERROR(COUNTIF(OFFSET(D6,-6,0,6,1),0)),0,IF(COUNTIF(OFFSET(D6,-6,0,6,1),0)>=6,SUM(C$6:C6)-SUM(D$5:D5),0)),0)
- Flexible version (you can change the parameters on the right):
- =IF(SUM(C$6:C6)-SUM(D$5:D5)>$G$23,IF(ISERROR(COUNTIF(OFFSET(D6,-($G$24-1),0,($G$24-1),1),0)),0,IF(COUNTIF(OFFSET(D6,-($G$24-1),0,($G$24-1),1),0)>=($G$24-1),SUM(C$6:C6)-SUM(D$5:D5),0)),0)

Advertisement

RAW Paste Data
Copied

Advertisement