Click on Formula in Tool Bar 2. Combinations of abcdefg that have at least 2 of ab or c. For example if you want a new laptop a new smartphone and a new suit but you can only afford two of them there are three possible combinations to.
Public result As Variant Function Combinationsrng As Range n As Single Dim b As Single rng1 rngValue b WorksheetFunctionCombinUBoundrng1 1 n ReDim resultb n - 1 Call Recursiverng1 n 1 0 0 For g 0 To UBoundresult 2 resultUBoundresult 1 g Next g Combinations result End Function.
Public result As Variant Function Combinationsrng As Range n As Single Dim b As Single rng1 rngValue b WorksheetFunctionCombinUBoundrng1 1 n ReDim resultb n - 1 Call Recursiverng1 n 1 0 0 For g 0 To UBoundresult 2 resultUBoundresult 1 g Next g Combinations result End Function. For example to calculate 3-number permutations for the numbers 0-9 there are 10 numbers and 3 chosen so the formula is. Button each time after entering the necessary digits. If youre using Google Calculator click on the x.