There are many functions in the Formula-Finance drop-down menu opened in EXCEL. There are four loan-related functions:
Present value PV, final value FV, interest rate, monthly PMT.
For this problem, it is mainly to find the final value of annuity FV.
Find the FV function in the financial function, and enter the monthly interest rate in turn: R=B%/ 12, Nper- number of periods =M, and monthly PMT = a.
That is, you can get the answer: the amount of FV.