Purpose
Return value
Syntax
=COMBINA(number,number_chosen)
- number - The total number of items.
- number_chosen - The number of items in each combination.
Using the COMBINA function
The COMBINA function returns the number of combinations for a given number of items. A combination is a group of items where order does not matter. There are two kinds of combinations:
- Combinations that do not allow repetitions (e.g. 123)
- Combinations that do allow repetitions (e.g. 333)
The COMBINA function allows repetitions. To count combinations that do not allow repetitions, use the COMBIN function . To count permutations (combinations where order does matter) see the PERMUT function .
The COMBINA function takes two arguments: number , and number_chosen . Number is the number of different items available to choose from. The number_chosen argument is the number of items in each combination. Both arguments are required.
Example
To use COMBINA, specify the total number of items and “number_chosen”, which represents the number of items in each combination. For example, to calculate total 3-number combinations of numbers between 0-9, you can use a formula like this:
=COMBINA(10,3) // returns 220
The number argument is 10 since there are ten numbers between 0 and 9 available. Number_chosen is 3, since there are three numbers for each combination.
In the example shown above, the formula in cell D6, copied down, is:
=COMBINA(B6,C6)
At each new row, COMBINA calculates returns the number of combinations using the values in column B for number , and the values in column C for number_chosen . The results can be seen in column D.
Notes
- A combination is a group of items in any order. If order matters, use the PERMUT function .
- Arguments that contain decimal values are truncated to integers.
- COMBINA returns a #VALUE! error value if either argument is not numeric.
Purpose
Return value
Syntax
=DECIMAL(number,radix)
- number - A text string representing a number.
- radix - The base of the number to be converted, an integer between 2-36.
Using the DECIMAL function
The DECIMAL function converts a number in a known base into its decimal number equivalent. For example, the DECIMAL function can convert the binary number 1101 into the decimal number 13. The number provided to DECIMAL should be a text string .
The DECIMAL function takes two arguments : number and radix . Number should be the text representation of a number in a known base. Radix is the number of digits used to represent numbers (i.e. the base) and should be an integer between 2 and 36. The characters given in number need to conform to the numbering system specified with radix .
Examples
In the hexadecimal number system, the number 255 is represented as “FF”. To convert the text string “FF” to the decimal number 255, you can use the DECIMAL function like this:
=DECIMAL("FF",16) // returns 255
To convert the binary number 1101 to its decimal number equivalent, 13, use DECIMAL like this:
=DECIMAL("1101",2) // returns 13
In the example shown, the numbers in column B are in different bases, and the base is given in column C. The formula in column D5 is:
=DECIMAL(B5,C5) // returns 3
As the formula is copied down, the DECIMAL function converts each number in column B to its decimal equivalent using the base specified in column C for the radix argument. The decimal numbers in column D are the output from DECIMAL.
BASE function
The BASE function performs the opposite conversion as the DECIMAL function:
=BASE(100,2) // returns "1100100"
=DECIMAL("1100100",2) // returns 100
See more on the BASE function here .
Number system characters
Different bases use different alphanumeric characters to represent numbers. The table below shows the characters uses for binary, octal, decimal, and hexadecimal number systems.
| Name | Base | Alphanumeric characters |
|---|---|---|
| binary | 2 | 0 - 1 |
| octal | 8 | 0 - 7 |
| decimal | 10 | 0 - 9 |
| hexadecimal | 16 | 0 - 9 and A - F |
Notes
- The number argument should be provided as a text string .
- The result from DECIMAL is a numeric value.
- If number is negative, DECIMAL returns a #NUM! error.
- if number contains a decimal value, DECIMAL returns a #NUM! error.
- If number is out-of-range for the given base, DECIMAL returns a #NUM! error.