A common fix for this loan-repayment pattern is to cap the payment amount so it never exceeds the remaining balance.
Use these formulas:
- In I9:
=MIN(K8, $B$9-H9)
- In G9:
=SUM(H9:I9)
Then copy both formulas down the rest of the rows.
This works because MIN(K8, $B$9-H9) prevents the formula from trying to subtract more than the remaining loan amount as the balance approaches zero.
If formulas are not recalculating after filling down, also check that workbook calculation is turned on:
- Select File > Options.
- Select Formulas.
- Under Calculation options > Workbook Calculation, choose Automatic.
- Fill the formula down again using the fill handle, or press Ctrl+D.
References: