Formula to apply amount to array of cells until consumed

lploy1

New Member
Joined
Jun 3, 2015
Messages
2
with the data below

[TABLE="class: grid, width: 848"]
<colgroup><col><col><col><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]Reported Amt Balance[/TD]
[TD]Reported Amt On Acct[/TD]
[TD]Cust Balance (calculated col D - Col E )[/TD]
[TD]Invoice Amt Due from transactions[/TD]
[TD]Fwd Aged[/TD]
[TD]Curr[/TD]
[TD]31-60[/TD]
[TD]61-90[/TD]
[TD]91-120[/TD]
[TD]121+[/TD]
[/TR]
[TR]
[TD] $ 113,718[/TD]
[TD] $ 57,827[/TD]
[TD] $ 55,891[/TD]
[TD] $ 113,718[/TD]
[TD] $ 45,606[/TD]
[TD] $ 14,652[/TD]
[TD] $ 1,650[/TD]
[TD] $ - [/TD]
[TD] $ - [/TD]
[TD] $ 51,810[/TD]
[/TR]
</tbody>[/TABLE]

Want to apply the "Reported Amt On Acct" (B) to Col J, then Col I, H, G, F, E successively until Col "B" is consumed


eg Require a formula to apply this amount, sequentially to 121+, 57827 - 51810 = 0 rem 6017 then remainder to 91-120 - not required, then remainder to 61-90 not required, then remainder to 31-60 1650-6017 = 0 r 4367, Curr 14652-4367 = 10285 etc col J to col F.


Data is being returned in 2 data sets that will be combined using excel on a regular basis

:confused: was trying IF but was a time consuming formula

Any ideas?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Welcome to the forum.

Try:


ABCDEFGHIJK
Reported Amt BalanceReported Amt On AcctCust Balance (calculated col D - Col E )Invoice Amt Due from transactionsFwd AgedCurr31-6061-90
$ -$ -

<tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]91-120[/TD]
[TD="align: right"]121+[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]$113,718[/TD]
[TD="align: right"]$57,827[/TD]
[TD="align: right"]$55,891[/TD]
[TD="align: right"]$113,718[/TD]
[TD="align: right"]$45,606[/TD]
[TD="align: right"]$14,652[/TD]
[TD="align: right"]$1,650[/TD]

[TD="align: right"]$51,810[/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]$10,285[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet9

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]J3[/TH]
[TD="align: left"]=MAX(0,MIN(SUM(J2:$J2)-$B2,J2))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Put the formula in J3 and drag to the left to F3.
 
Last edited:
Upvote 0
:eeek:
Welcome to the forum.

Try:


ABCDEFGHIJK
Reported Amt BalanceReported Amt On AcctCust Balance (calculated col D - Col E )Invoice Amt Due from transactionsFwd AgedCurr31-6061-90
$ -$ -

<tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]91-120[/TD]
[TD="align: right"]121+[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]$113,718[/TD]
[TD="align: right"]$57,827[/TD]
[TD="align: right"]$55,891[/TD]
[TD="align: right"]$113,718[/TD]
[TD="align: right"]$45,606[/TD]
[TD="align: right"]$14,652[/TD]
[TD="align: right"]$1,650[/TD]

[TD="align: right"]$51,810[/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]$10,285[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet9

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]J3[/TH]
[TD="align: left"]=MAX(0,MIN(SUM(J2:$J2)-$B2,J2))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Put the formula in J3 and drag to the left to F3.


thanks for the help seems like it will work well.

also for the welcome to the forum, been following for a while but never posted....:)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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