TRY NEW VERSION

COMBINA

COMBINA(arg1, arg2) → { number | string | boolean }

Returns the number of combinations with repetitions for a given number of items.

Parameters:

Name Type Description
arg1 number

Is the total number of items.

arg2 number

Is the number of items in each combination.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.COMBINA(7, 2));
builder.SaveFile("xlsx", "COMBINA.xlsx");
builder.CloseFile();

Resulting document