
Originally Posted by
phineas629
I'm looking for a vba solution to determine when a loan will reach 80% and 50% paid principal. [....] I am not looking for a solution that uses the spreadsheet. I want to do it in vba.
Understood. But it might be best to start with Excel.
Suppose the loan amount is in B1, the periodic interest rate is in B2, and the number of payments is in B3. The payment in B4 is:
=PMT(B2,B3,-B1)
Suppose the percentage paid (e.g. 50% or 80%) is in B5. The number of payments is:
=NPER(B2,B4,-B1,B1*(1-B5))
In VBA:
Caveat: I am using the VBA functions Pmt and NPer here. Alternatively, use the Excel-like functions WorksheetFunction.Pmt and WorksheetFunction.NPer. There is a subtle difference in results.
Bookmarks