WorksheetFunction.Combin Method

Returns the number of combinations for a given number of items. Use Combin to determine the total possible number of groups for a given number of items.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Combin ( _
    Arg1 As Double, _
    Arg2 As Double _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Double
Dim Arg2 As Double
Dim returnValue As Double

returnValue = instance.Combin(Arg1, Arg2)
double Combin(
    double Arg1,
    double Arg2
)

Parameters

  • Arg2
    Type: System.Double

    The number of items in each combination.

Return Value

Type: System.Double

Remarks

Numeric arguments are truncated to integers.

If either argument is nonnumeric, Combin generates an error.

If number < 0, number_chosen < 0, or number < number_chosen, Combin generates an error.

A combination is any set or subset of items, regardless of their internal order. Combinations are distinct from permutations, for which the internal order is significant.

The number of combinations is as follows, where number = n and number_chosen = k:

Figure 1: Number of combinations

Number of combinations

Where:

Figure 2: Equation

Equation

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace