Advertisement
Guest User

Chandoo.org - Calculate Payment Schedule Homework

a guest
Nov 11th, 2011
254
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. RE: http://chandoo.org/wp/2011/11/11/calculate-payment-schedule-homework/
  2.  
  3. 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).
  4.  
  5. Fixed version:
  6. =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)
  7.  
  8. Flexible version (you can change the parameters on the right):
  9. =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)
  10.  
  11.  
Advertisement
RAW Paste Data Copied
Advertisement