Saturday, August 13, 2016

How to use the PV Function (WS,VBA)

Description

The Microsoft Excel PV function returns the present value of an investment based on an interest rate and a constant payment schedule.

Syntax

The syntax for the PV function in Microsoft Excel is:
PV( interest_rate, number_payments, payment, [FV], [Type] )

Parameters or Arguments

interest_rate
The interest rate for the investment.
number_payments
The number of payments for the annuity.
payment
The amount of the payment made each period. If this parameter is omitted, you must enter a FV value.
FV
Optional. It is the future value of the payments. If this parameter is omitted, it assumes FV to be 0.
Type
Optional. It indicates when the payments are due. If the Type parameter is omitted, it assumes a Type value of 0. Type can be one of the following values:
ValueExplanation
0Payments are due at the end of the period. (default)
1Payments are due at the beginning of the period.

Applies To

  • Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Function

  • Worksheet function (WS)
  • VBA function (VBA)

Example (as Worksheet Function)

Let's look at some PV examples and explore how to use the PV function as a worksheet function in Microsoft Excel:
This first example returns the present value of an investment that pays $250 at the end of every month for 2 years. The money paid out will earn 7.5% annually.
=PV(7.5%/12, 2*12, 250, , 0)
Result: -$5,555.61
This next example returns the present value of an investment that pays $50 at the beginning of every week for 4 years. The money paid out will earn 6% annually.
=PV(6%/52, 4*52, 50, , 1)
Result: -$9,252.07
This next example returns the present value of an investment that pays $100 at the end of every year for 10 years. The money paid out will earn 5.25% annually.
=PV(5.25%/1, 10*1, 100, , 0)
Result: -$762.88

Example (as VBA Function)

The PV function can also be used in VBA code in Microsoft Excel.
Let's look at some Excel PV function examples and explore how to use the PV function in Excel VBA code:
Dim LValue As Currency

LValue = PV(0.0525/1, 10*1, 100, , 0)
In this example, the variable called LValue would now contain the value of ($762.88)