=XNPV(rate, values, dates)
Rate: the rate at which you would like to discount the values at. Typically, this rate is the pre-calculated Weighted-average Cost of Capital for your project, or the return required for a Distribution Waterfall. Rate is a required parameter.
Values: a series of cash flows that corresponds to a schedule of payments in dates. Cash flows are discounted based on a 365-day year. Investments or cash outflows are represented by negative values, while income or cash inflows are represented by positive values. Values is a required parameter.
Dates: a schedule of dates that corresponds to the cash flow values. The first date in the series must correspond to the beginning of the series of cash flows. Dates is a required parameter.
Operating tip: When operating the XNPV function, make sure that the columns you have entered cash flows and dates into line up exactly!