COMBIN
Returns the number of combinations for a given number of items.
Syntax
expression.COMBIN(arg1, arg2);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The total number of items, a numeric value greater than or equal to 0. | |
arg2 | Required | ApiRange | ApiName | number | The number of items in each combination, a numeric value greater than or equal to 0 but less than the total number of items. |
Returns
number
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.COMBIN(67, 7));