Per Claussen
Member

Case:
Column C has formula: =B*Amount
Column D has formula: =C*percentOfAmount
My problem:
I need the D formula to check if sum of the D cells (above and actual cell) will pass the maxOfAmount - in this case 5% of 10 000 000.
If so, the actual cell should contain the difference between the maxOfAmount and the sum of the above D cells. If difference is negative, the value should be zero.
We can also express it like this: the sum of column D should be exactly "maxOfAmount"
How should this formula look like?