Share via


WorksheetFunction.Xnpv Method

Excel Developer Reference

Returns the net present value for a schedule of cash flows that is not necessarily periodic. Read/write Double.

Syntax

expression.Xnpv(Arg1, Arg2)

expression   A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data Type Description
Arg1 Required Variant A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment.
Arg2 Required Variant A schedule of payment dates that corresponds to the cash flow payments. The first payment date indicates the beginning of the schedule of payments. All other dates must be later than this date, but they may occur in any order.

Return Value
Double

Remarks

To calculate the net present value for a series of cash flows that is periodic, use the NPV method.

Example

The following example displays the net present value for an investment with the above cost and returns. The cash flows are discounted at 9 percent. (2086.6476 or 2086.65)

Visual Basic for Applications
  =XNPV(.09,A2:A6,B2:B6)

See Also