Automatically distribute an amount across multiple rows to settle against the values in another column

vikrampnz

Board Regular
Joined
Jun 20, 2006
Messages
111
Office Version
  1. 2007
Platform
  1. Windows
Hello

I have a worksheet with multiple rows showing multiple bills details. I have bill amount in column C in each row. I want to enter a lumpsum payment amount in column F and want it to break down in column H as allotted payment to settle each bill in full and then flow onto the next row of H until the amount is fully consumed i.e 0.

The bills are entered datewise. So, basically when I enter a payment amount at a later date after the credit period, that row has multiple pending bill rows above. I would like it pick up the last unpaid / partly paid bill and settle from there down until the payment amount in that row is completely consumed.

I am attaching a sample sheet for your reference.

I would really appreciate any help I can get.

Thanks

Test Cycle.xlsx
ABCDEFGHI
124-Jun-23Credit Period:30Current Opening Balance:5,00,000
2Total Overdue:6,25,000
3
4MilestoneAmountWork DateBill Due DatePayment AmountPayment DateAllotted PaymentBalance From the bIll
51B-91,25,00005-May-2304-Jun-231,25,0000
62A-105,00,00010-May-2309-Jun-235,00,0000
73B-103,75,00002-Jun-2302-Jul-231,75,0002,00,000
8  8,00,000 #VALUE!
9   #VALUE!
10   #VALUE!
11   #VALUE!
12   #VALUE!
13   #VALUE!
14   #VALUE!
15   #VALUE!
BILL CYCLE
Cell Formulas
RangeFormula
B1B1=TODAY()
H2H2=SUMIF(E5:E21,"<"&B1,C5:C21)
I5:I15I5=C5-H5
H8:H15H8=IFERROR(H7+C8-F8,"")
C8:C15C8=IFERROR(VLOOKUP($B8,#REF!,2),"")
E5:E15E5=IF(D5="","",D5+$E$1)
Cells with Data Validation
CellAllowCriteria
B5:B15List=SLAB
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Maybe:

Book1
ABCDEFGHI
16/24/2023Credit Period:30Current Opening Balance:500000
2Total Overdue:625000
3
4MilestoneAmountWork DateBill Due DatePayment AmountPayment DateAllotted PaymentBalance From the bIll
51B-912500005-May-2304-Jun-231250000
62A-1050000010-May-2309-Jun-235000000
73B-1037500002-Jun-2302-Jul-23175000200000
8  800000  
Sheet4
Cell Formulas
RangeFormula
B1B1=TODAY()
H2H2=SUMIF(E5:E21,"<"&B1,C5:C21)
H5:H8H5=IF(C5<>"",MIN(F$8-SUM(H$4:H4),C5),"")
I5:I8I5=IF(C5<>"",C5-H5,"")
C8C8=IFERROR(VLOOKUP($B8,#REF!,2),"")
E5:E8E5=IF(D5="","",D5+$E$1)
 
Upvote 0
Hello Eric W

Thanks for your response. It is working for the first payment. But, for the bills and new payments below the first payment row, its not work. This is a running sheet showing multiple bills and lumpsum payments made at various points. I am attaching the minisheet for your reference.

Thanks again for your help

Test Cycle.xlsx
ABCDEFGHI
126-Jun-23Credit Period:30Current Opening Balance:5,00,000
2Total Overdue:6,25,000
3
4MilestoneAmountWork DateBill Due DatePayment AmountPayment DateAllotted PaymentBalance From the bIll
51B-91,25,00005-May-2304-Jun-231,25,0000
62A-105,00,00010-May-2309-Jun-234,75,00025,000
73B-103,75,00002-Jun-2302-Jul-2303,75,000
84C80 6,00,00000
95A1221,00,000 021,00,000
106A120 5,00,00000
11    
12    
BILL CYCLE
Cell Formulas
RangeFormula
B1B1=TODAY()
H2H2=SUMIF(E5:E21,"<"&B1,C5:C21)
H5:H12H5=IF(C5<>"",MIN(F$8-SUM(H$4:H4),C5),"")
I5:I12I5=IF(C5<>"",C5-H5,"")
C11:C12C11=IFERROR(VLOOKUP($B11,#REF!,2),"")
E5:E12E5=IF(D5="","",D5+$E$1)
Cells with Data Validation
CellAllowCriteria
B5:B12List=SLAB
 
Upvote 0
Try :

Book1
ABCDEFGHI
126/06/2023Credit Period:30Current Opening Balance:500,000
2Total Overdue:625,000
3
4MilestoneAmountWork DateBill Due DatePayment AmountPayment DateAllotted PaymentBalance From the bIll
51B-9125,00005/05/202304/06/2023125,000-
62A-10500,00010/05/202309/06/2023500,000-
73B-10375,00002/06/202302/07/2023375,000-
84C8- 600,000--
95A122,100,000 100,0002,000,000
106A12- 500,000--
Sheet1
Cell Formulas
RangeFormula
B1B1=TODAY()
H2H2=SUMIF(E5:E21,"<"&B1,C5:C21)
H5:H10H5=IF(C5<>"",MIN(SUM($F$5:$F$10)-SUM(H$4:H4),C5),"")
I5:I10I5=IF(C5<>"",C5-H5,"")
E5:E10E5=IF(D5="","",D5+$E$1)
 
Upvote 0
Thanks Sanjeev1976 !! ....That worked very well !!

Thank you again !
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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