CUMIPMT
Returns the cumulative interest paid between two periods.
Syntax
expression.CUMIPMT(arg1, arg2, arg3, arg4, arg5, arg6);
expression - A variable that represents a ApiWorksheetFunction class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| arg1 | Required | ApiRange | ApiName | number | The interest rate for the investment. | |
| arg2 | Required | ApiRange | ApiName | number | The total number of payment periods. | |
| arg3 | Required | ApiRange | ApiName | number | A present value of the payments. | |
| arg4 | Required | ApiRange | ApiName | number | The first period included into the calculation. | |
| arg5 | Required | ApiRange | ApiName | number | The last period included into the calculation. | |
| arg6 | Required | ApiRange | ApiName | number | The timing of the payment. |
Returns
number
Example
This example shows how to get the cumulative interest paid between two periods.
- Code
- Result
// How to return the cumulative interest paid between two periods.
// Use function to get cumulative interest paid between two periods.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.CUMIPMT(0.1/12, 2*12, 2000, 1, 24, 0));