Alea between bounds without duplicates.
Le Pingou Posted messages 12273 Registration date Status Contributor Last intervention -
Hello,
I created a deck of 40 playing cards. On each of these cards, I would like to randomly put the order of the 8 players to resolve events in the game.
Example 1: Card number 1 will have the players play in this order: BLUE, YELLOW, RED, GREEN, PURPLE, ORANGE, PINK, CYAN
Example 2: Card number 24 will have the players play in this order: CYAN, PURPLE, BLUE, ORANGE, YELLOW, GREEN, PINK, RED
I used the formula =RANDBETWEEN(1;8) across the entire row but I am getting duplicates... I replaced the players' colors with numbers. I do not want to use VBA.
Note that there are more than 40,320 permutation possibilities... that makes a lot of cards lol. I will take the 40 most balanced possibilities.
Thank you =)
4 answers
Hello.
Since it's a random draw, chance could even pull the same player 8 times!
I suggest running your formulas and manually correcting the duplicates...
Retirement is great! Especially in the Caribbean...
Raymond (INSA, AFPA)
Hello,
[...]chance could even draw the same player 8 times! [...] That's exactly where it gets complicated.
I stressed about it so much that, as a result, I corrected it manually before you even told me to do so.
But out of simple curiosity, is there any way to do it without duplicates?
