Cumulative sum with max

401kspreadsheets

New Member
Joined
Mar 28, 2019
Messages
4
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Calibri; color: #000000}</style>I'm trying to calculate the cumulative total up to a certain maximum. In the example below, I need column D to calculate the contribution amount (by multiplying Column B and Column C), but column D should only total up to 19000. Once the cumulative total of 19000 is reached, the subsequent rows should be reduced.

ABCD
1Pay DateWages% ElectedContribution Calculation
21/1/19$10,000.0025%$2,500.00
31/15/19$10,000.0025%$2,500.00
41/29/19$10,000.0025%$2,500.00
52/12/19$10,000.0025%$2,500.00
62/26/19$10,000.0025%$2,500.00
73/12/19$10,000.0025%$2,500.00
83/26/19$10,000.0025%$2,500.00
94/9/19$10,000.0025%$1,500.00
104/23/19$10,000.0025%$0.00
115/7/19$10,000.0025%$0.00

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try this

<b>Sheet</b><br /><br /><table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:104px;" /><col style="width:100px;" /><col style="width:99px;" /><col style="width:176px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="background-color:#ffff00; ">Pay Date</td><td style="background-color:#ffff00; ">Wages</td><td style="background-color:#ffff00; ">% Elected</td><td style="background-color:#ffff00; ">Contribution Calculation</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="text-align:right; ">01/01/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="text-align:right; ">15/01/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="text-align:right; ">29/01/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="text-align:right; ">12/02/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="text-align:right; ">26/02/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="text-align:right; ">12/03/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="text-align:right; ">26/03/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">2500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="text-align:right; ">09/04/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">1500</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="text-align:right; ">23/04/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">0</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >11</td><td style="text-align:right; ">07/05/2019</td><td style="text-align:right; ">$10,000.00</td><td style="text-align:right; ">25%</td><td style="text-align:right; ">0</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >D2</td><td >=IF(B2*C2+SUM($D$1:D1)<=19000,B2*C2,19000-SUM($D$1:D1))</td></tr></table></td></tr></table> <br /><br />
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,901
Messages
6,122,157
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top