Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a User Defined Function to calculate the present value of a growing finite ordinary annuity and name it PVGFOA. The arguments must be C,

Create a User Defined Function to calculate the present value of a growing finite ordinary annuity and name it PVGFOA. The arguments must be C, r, g, and n (in that order). See page 18 of your text, the Chapter 1 workbook, and the class lecture notes if you need help with formulas. The function should be capable of computing a value for any reasonable set of inputs, including the special case where r = g. (Hint: If the discount rate is not equal to the growth rate, then the book formula used in class works. If not, then you need to derive a different but simple formula to calculate the answer to the function. For help with similar VBA code see the ADDING3 function in the Example Function.xlsmworkbook.

Example: * I NEED FOR A PVGFOA FUNCTION THOUGH*

unction PVGFOA(C, r, g, n)

'The arguments are:

' C = Any number

' r = Any number

' g = Any number

' n = Any number

If x + y + z >= 0 Then

ADDING3 = x + y + z

' More lines of code could be inserted here if needed!

'Second, if the sum is negative change it to positive:

Else: ADDING3 = (-1) * (x + y + z)

' More lines of code could be inserted here if needed!

End If

'All done!

End Function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Credit Risk Analysis And Management

Authors: Ciby Joseph

1st Edition

1118604911, 978-1118604915

More Books

Students also viewed these Finance questions