Difference between revisions of "Documentation/How Tos/Calc: COMBIN function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
m |
||
Line 3: | Line 3: | ||
== COMBIN == | == COMBIN == | ||
Returns the number of combinations of a subset of items. | Returns the number of combinations of a subset of items. | ||
− | |||
=== Syntax: === | === Syntax: === | ||
Line 12: | Line 11: | ||
: <tt>'''COMBIN'''</tt> returns the number of ways to choose these items. For example if there are 3 items A, B and C in a set, you can choose 2 items in 3 different ways, namely AB, AC and BC. | : <tt>'''COMBIN'''</tt> returns the number of ways to choose these items. For example if there are 3 items A, B and C in a set, you can choose 2 items in 3 different ways, namely AB, AC and BC. | ||
− | |||
: <tt>'''COMBIN'''</tt> implements the formula: | : <tt>'''COMBIN'''</tt> implements the formula: | ||
:: <tt>'''setsize!/(subsetsize!*(setsize-subsetsize)!)'''</tt> | :: <tt>'''setsize!/(subsetsize!*(setsize-subsetsize)!)'''</tt> | ||
− | |||
=== Example: === | === Example: === | ||
<tt>'''COMBIN(3,2)'''</tt> | <tt>'''COMBIN(3,2)'''</tt> | ||
: returns <tt>'''3'''</tt>. | : returns <tt>'''3'''</tt>. | ||
− | |||
=== See also: === | === See also: === |
Revision as of 07:02, 2 March 2008
COMBIN
Returns the number of combinations of a subset of items.
Syntax:
COMBIN(setsize; subsetsize)
- setsize is the number of items in the set.
- subsetsize is the number of items to choose from the set.
- COMBIN returns the number of ways to choose these items. For example if there are 3 items A, B and C in a set, you can choose 2 items in 3 different ways, namely AB, AC and BC.
- COMBIN implements the formula:
- setsize!/(subsetsize!*(setsize-subsetsize)!)
Example:
COMBIN(3,2)
- returns 3.