I want to sum a range once the range is greater than a certain amount.

For an example in column D starting in D2

Once the sum of "20% of sales" is greater than 10, I want it to sum anything afterwards in Column A. I want to be able to drag that down and as soon it is greater than 10 in cells D5 will be 10 and D6 will be 30.

My formula was =SUMIF(sum($B$2:B2),">10",$A$2:A2)

A | B | C | D | |

1 | SALES | 20% of sales | ||

2 | 10 | 2 | ||

3 | 20 | 4 | ||

4 | 20 | 4 | ||

5 | 10 | 2 | ||

6 | 20 | 4 |

<tbody>

</tbody>

Thanks in advance,

Andrew