WorksheetFunction.Xnpv(Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the net present value for a schedule of cash flows that is not necessarily periodic.
public:
double Xnpv(System::Object ^ Arg1, System::Object ^ Arg2);
public double Xnpv (object Arg1, object Arg2);
Public Function Xnpv (Arg1 As Object, Arg2 As Object) As Double
Parameters
- Arg1
- Object
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
- Object
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.
Returns
Remarks
Important: The Xnpv method does not provide a parameter that corresponds to the rate argument required by the corresponding XNPV function (=XNPV(rate, values, dates)). To work around this limitation in VBA code, instead of using the Xpnv method, call the XNPV function by using the Evaluate(Object) method.
To calculate the net present value for a series of cash flows that is periodic, use the Npv(Double, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) method.