Hi Chris, I slightly amended that code in the original post as there was a typo in it: The initial Loan_Part_Amount of loan 10001, loan part 1 should be $400,000 instead of $150,000. To further clarify my answer, have a look at the Loan_Amount for Loan 10004. For the first month, the Loan_Amount is $210,000, $130,000 from loan part 1 and $80,000 from loan part 3. However, the Loan_Part_Amount of both loan parts decreases because of the redemption to $87,732.17 and $40,396.04 respectively. What I want is that the Loan_Amount in those rows is equal to the sum of the Loan_Part_Amounts (i.e. $128,128.21), because that is the amount on which the determination of the interest rate is based. The same holds for all the numbers in yellow in the figure below: So, the Loan_Amount in a certain Month, should be equal to the sum of the Loan_Part_Amounts of that Month, grouped by Loan_Number. This sum must be calculated during the loop because it is used to determine LtV, Interest and Redemption, which determines the Loan_Part_Amounts for the next iteration. Thanks in advance, Willem
... View more