Hello there,
Please help me create a macro that calculates the present value of cash flows.
Please see my spreadsheet to understand .
For example Ins_1, only the first cash flow's present value should be calculated using the interest rate for Ins_1 and the difference in time between the Cash Flow Pay Date and the Maturity Date for Ins_1 (I have illustrated this in the spreadsheet).
For Ins_2 the first two cash flows need to be taken into account with the first cash flow's present value should be calculated using the interest rate for Ins_2 and the difference in time between the First Cash Flow Pay Date and the Maturity Date for Ins_2. For the second Cash flow, the present value should be calculated using the interest rate for Ins_2 and the difference in time between the Second Cash Flow Pay Date and the Maturity Date for Ins_2.
What I need this macro to do is to calculate the present value of cash flows in cells B2:B6 based on the dates in Cells A2:A6 e.g. For Ins_3 the cash flows that are taken into account for the calculation are those that are before the Maturity Date for Ins_3.
Thank you in advance.
Bookmarks