Difference between revisions of "Documentation/How Tos/Calc: COMBINA function"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 4: Line 4:
 
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Mathematical_functions|<div style="font-size: 140%;">Mathematical Functions]]
 
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Mathematical_functions|<div style="font-size: 140%;">Mathematical Functions]]
 
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_CONVERT_function
 
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_CONVERT_function
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_COMVIN_function
+
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_COMBIN_function
 
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Logical_functions
 
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Logical_functions
 
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Number_Conversion_functions
 
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Number_Conversion_functions

Revision as of 08:39, 1 June 2013


COMBINA

Returns the number of combinations of a subset of items.

Syntax:

COMBINA(n; k)

n is the number of items in the set.
k is the number of items to choose from the set.
COMBINA returns the number of unique ways to choose these items, where the order of choosing is irrelevant, and repetition of items is allowed. For example if there are 3 items A, B and C in a set, you can choose 2 items in 6 different ways, namely AA, AB, AC, BB, BC and CC; you can choose 3 items in 10 different ways, namely AAA, AAB, AAC, ABB, ABC, ACC, BBB, BBC, BCC, CCC.
COMBINA implements the formula:
(n+k-1)!/(k!(n-1)!)

Example:

COMBINA(3,2)

returns 6.

COMBINA(3,3)

returns 10.
Template:Documentation/SeeAlso
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_COMBINA_function&oldid=225738"
Views
Personal tools
Navigation
Tools