I have honestly and sincerely gone through a good number of questions regarding this topic, but none seem to exactly hit the mark for my issue (due to my lack of knowledge, obviously).
In any case, I work in insurance and currently working on a program with a loss aggregate limit of USD 10 mln in the year. So the table on the left in the attached snapshot shows the incidents(losses) during that day of the month (going down) during that year (going across). What I would like to do in the table on the right is to tell it to sum losses until USD 10 mln is reached then set all remaining losses for the remainder of the year to zero (I have months in consecutive order with subtotals for the months in between).
To be clearer, for example, January 11th, 2017 should read USD 9,772,760 since there was a USD 227,240 loss on January 1st, 2017 (combined would be USD 10 mln) and therefore would exclude the January 26th loss of USD 222,582 or any following losses for the rest of the year (set to 0).
Hope I'm clear, and I hope I'm not breaking any protocols by posting this as is. enter image description here