Question: Please help me to solve this problem in Excel by using VBA ( Alt + F 1 1 ) . Consider an annuity that pays
Please help me to solve this problem in Excel by using VBA AltF
Consider an annuity that pays a fixed amount of C every time period for n periods. If the discount rate is r the PV of this annuity is:
PV C r C r C r C rn
a Write a function to compute the PV of an annuity. You must use recursion in this function.
Name the function AnnuityPV and use it to compute the PV of an annuity that pays $ at the end of each year for the next years. The discount rate is per year.
b Now rewrite the function but you must use Do While in the function.
Name this function AnnuityPV and use it to compute the PV of an annuity that pays $ at the end of each year for the next years. The discount rate is per year.
c Write a macro that uses the AnnuityPV function you have written in a and b
Name your macro as AnnuityPVCalc.
This macro should ask the user for the inputs: C r and n
These inputs should be asked for as follows:
Please input the cash flow:
Please input the interest rate:
Please input the number of periods:
The title of each of the box that asks for the above input should be:
Input for Annuity PV Calculator
For each of the above, the following default values should be supplied. User can overwrite these default values to provide the new values.
Cash flow of interest rate of or and number of periods as
The result should be displayed in a message box that states the following.
The present value of the annuity is:
The title of the box that provides the above output should be:
Annuity PV Calculator Output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
