In Excel, re-arrange a sequence N times randomly
Column A is a random sequence. Cell B2 contains the parameter that represents the number of times of re-arranging members of the sequence.
A |
B |
|
1 |
Items |
Replicates |
2 |
A |
2 |
3 |
B |
|
4 |
C |
|
5 |
D |
We need to rearrange column A N times.
D |
|
1 |
Result |
2 |
C |
3 |
D |
4 |
B |
5 |
A |
6 |
D |
7 |
A |
8 |
B |
9 |
C |
Use SPL XLL to enter the formula below:
=spl("=?2.conj(?1.sort(rand()))",A2:A5,B2)
"integer.()" represents looping N times. conj() function concatenates multiple sequences. sort(rand())sorts a sequence randomly.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/