PERMUTATIONA function
PERMUTATIONA counts ordered sequences in which an item can be used again, such as the possible PIN codes or passwords of a given length. The count equals the number raised to the length.
Example
Read it as a sentence: count the ordered ways to pick 2 items from 3 when items can repeat, which gives 9.
A
B
C
D
1
9
2
3
Syntax
PERMUTATIONA(number, number_chosen)
-
number(required) - Total distinct items.
-
number_chosen(required) - Length of each arrangement.
Returns: The number of ordered arrangements when repeats are allowed.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=PERMUTATIONA(3,2) | 9 | Working example |
=PERMUTATIONA("3",2) | 9 | Text-number in first arg |
=PERMUTATIONA({3,3},2) | 9 | Array in first arg (lifts, spills) |
=PERMUTATIONA(0,0) | 1 | 0,0 |
=PERMUTATIONA(2,3) | 8 | Chosen > number |
=PERMUTATIONA(3.9,2.9) | 9 | Fractions truncated |
=PERMUTATIONA("abc",2) | #VALUE! | Non-numeric text in first arg |
=PERMUTATIONA(NA(),2) | #N/A | Error in first arg |
Watch out for
- It equals number raised to number_chosen.
- Non-integers are truncated.
Where it works
- Excel
- PERMUTATIONA arrived in Excel 2013. Older versions do not have it.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .