RangeXNPV  - script and chart function
                
RangeXNPV() returns the net present value for a schedule of cash flows (not necessarily periodic) represented by paired numbers in the expressions given by pmt and date. All payments are discounted based on a 365-day year.
Syntax:
RangeXNPV(discount_rate, value, date{, value, date})
Return data type: numeric
| Argument | Description | 
|---|---|
| discount_rate | 
                                 discount_rate is the yearly rate that the payments should be discounted by.  | 
                        
| 
                                 value  | 
                            A cash flow or a series of cash flows that corresponds to a schedule of payments in dates. Each value may be a single value or a range of values as returned by an inter-record function with a third optional parameter. The series of values must contain at least one positive and one negative value. | 
| 
                                 date  | 
                            A payment date or a schedule of payment dates that corresponds to the cash flow payments. | 
When working with this function, the following limitations apply:
- 
                        
Text values, NULL values and missing values are disregarded.
 - 
                        
All payments are discounted based on a 365-day year.