Formula for solving the permutation and combination of EXCEL

Reported answer
Formula for solving the permutation and combination of EXCEL
Ask online customer service
Scan the code to ask online customer service

There are five columns of ABCDE. Column A: 1, 2, 3, 4, 5, 6, 7; Column B: 8, 9, 10, 11, 12, 13, 14; Column C: 15, 16, 17, 18, 19, 20, 21; Column D: 22, 23, 24, 25 View All

  • Number of answers

    four

  • Number of browses

    8,018

4 answers Default sorting
  • Default sorting
  • Sort by time

Adopted
The following is a formula for randomly selecting 5 numbers from all:
```less
=INDEX($A$1:$E$7,INDEX(COLUMN(),RAND()*7+1,1))
```
This formula will select a random number from A1 to E7, and ensure that the selected number is not duplicate with other selected numbers.
Explanation:
-INDEX (COLUMN(), RAND() * 7+1,1) Writing ` (INDEX (COLUMN(), RAND() * 7+1), 1) ` means to select a random number in the range of column numbers (from 1 to 7) and multiply it by a constant to increase randomness.
-INDEX ($A $1: $E $7, INDEX (COLUMN(), RAND() * 7+1,1)) will nest the above two parts to ensure that the selected number is in the range of A1 to E7.
This formula can help you select 5 numbers randomly from all, and ensure that there is no repetition. If you need more help, please feel free to ask me questions.
cancel comment
Excel has a permutation and combination formula, PERMUT is the permutation function, and COMBIN is the combination function.
1. The computer opens the Excel table and enters the combination function=COMBIN (50,3).

2. Enter and you will get 19600.

3. Enter the arrangement formula=PERMUT (50,3)/PERMUT (3,3).

4. Just go back.
cancel comment

Sub musub()
Dim caseArray(3) As String
caseArray(0) = A
caseArray(1) = B
caseArray(2) = C
caseArray(3) = D
Dim rowNum As Integer
For i = 1 To 4
For j = 1 To 4
For k = 1 To 4
For l = 1 To 4
rowNum = rowNum + 1
Cells (rowNum, 1)=Situation&CStr (rowNum)
Cells(rowNum, 2) = caseArray(i - 1)
Cells (rowNum, 3)=c price point special and book aseArray (j - 1)
Cells(rowNum, 4) = caseArray(k - 1)
Cells(rowNum, 5) = caseArray(l - 1)
Next l
Next k
Next j
Next i
End Sub
cancel comment
Can there be duplicate numbers in a set of data?
Is it a group number if the order is different? 12345678 and 87654321
cancel comment
ZOL Q&A > Formula for solving the permutation and combination of EXCEL

report

Thank you for contributing to the harmony of the community. Please select the type of report

Reported successfully

It will be handled after verification
Thank you for your contribution to community harmony

Scan the code to participate in the trial of new products at 0 yuan
You can get the sheets and grand gifts on the top floor

 Scan and pay attention to us
Tips

Are you sure you want to cancel this registration and exit this activity?