In Excel, I'd probably do it this way for true randomness but ensuring an even split.
Assuming the Player info is in columns A-H, column headers in row 1, and the data starting in row 2. (away from the game so can't see what actual export looks like)
You put =rand() into cell I2 and copy that formula down to the last entry. You'll get numbers like 0.672140636.
Then in cell J2 you put =ROUNDUP(RANK.EQ(I2;I:I)/(COUNT(I:I)/30);0) and copy down to the last entry.
In column J you now have a list of team ids ranging from 1 to 30. You can copy those numbers and Paste Special as Values Only over the current team ids.
Notes:
If the number of entries isn't a multiple of 30 then you won't get an even split. So if you want everyone to have an exact squad of 25, then you need 750 players. If you have 751 then the extra player will get assigned in a patterned way (not random) and one squad will have 26.
If you wanted a different number of teams then you can change the 30 in the second formula to whatever you desire.
Probably not what OP is after but it was a fun formula.
|