### NPV(rate, values())

Returns the present value of a series of unequal cash flows at regular intervals (Double).

 rate The discount rate (Double). values() The array of cash flow values (Variant)

 REMARKS
 * This function returns the net present value of an investment based on a series of periodic cash flows (payments and receipts) and a discount rate.* The "rate" is a percentage expressed as a decimal (eg 5% = 0.05)* The "values" is an array of Double values.* The "values" array does not have to contain at least one negative value (a payment) and at least one positive value (a receipt).* You can use the FV function to return the future value of a series of equal cash flows at regular intervals.* You can use the PV function to return the present value of a series of equal cash flows at regular intervals.* The equivalent Excel function is Application.WorksheetFunction.NPV* The equivalent .NET function is Microsoft.VisualBasic.Financial.Npv* For the Microsoft documentation refer to docs.microsoft.com

`Dim ardoubles(3) as Double ardoubles(0) = 200 ardoubles(1) = 600 ardoubles(2) = 400 ardoubles(3) = 1000 Debug.Print Npv(0.05, ardoubles)  '= 1902.931  Debug.Print Npv(0.1, ardoubles)   '= 1661.225  Debug.Print Npv(0.5, ardoubles)   '= 716.049  Debug.Print Npv(1, ardoubles)     '= 362.5  Dim ardoubles(3) as Double ardoubles(0) = -20 ardoubles(1) = 10 ardoubles(2) = 10 ardoubles(3) = 20 Debug.Print Npv(0.05, ardoubles)  '= 15.115  Debug.Print Npv(0.1, ardoubles)   '= 11.256  Debug.Print Npv(0.5, ardoubles)   '= -1.975  Debug.Print Npv(1, ardoubles)     '= -5  `