Spreadsheet: 670124d1585757759-formula-for-team-selection-start-again-test-sort
Sheet: Sheet1

 |  |  |  |  | EXAMPLE 1 |  |  |  |  |  | EXAMPLE 2 |  | Sorted by number then team assignmentsTeam
 |  | From this | Team setup |  | to | Sorted by Team | This |  | OR |  | From this | to | Team setup |  | This |  |  | Sorted by Team
 | 3 | Player 1 |  |  |  | 1 | 3 | Player 1 |  | 3 | Player 1 |  | 1 | 3 | Player 1 |  |  | 1 | 3 | Player 1
 | 4 | Player 2 |  |  |  | 1 | 9 | Player 6 |  | 4 | Player 2 |  | 2 | 4 | Player 2 |  |  | 1 | 10 | Player 7
 | 7 | Player 3 |  |  |  | 1 | 12 | Player 13 |  | 7 | Player 3 |  | 3 | 7 | Player 3 |  |  | 1 | 18 | Player 18
 | 7 | Player 4 |  |  |  | 1 | 18 | Player 18 |  | 7 | Player 4 |  | 4 | 7 | Player 4 |  |  | 1 | 21 | Player 24
 | 8 | Player 5 |  |  |  | 2 | 4 | Player 2 |  | 8 | Player 5 |  | 5 | 8 | Player 5 |  |  | 2 | 4 | Player 2
 | 9 | Player 6 |  |  |  | 2 | 10 | Player 7 |  | 9 | Player 6 |  | 6 | 9 | Player 6 |  |  | 2 | 10 | Player 8
 | 10 | Player 7 |  |  |  | 2 | 12 | Player 12 |  | 10 | Player 7 |  | 1 | 10 | Player 7 |  |  | 2 | 17 | Player 17
 | 10 | Player 8 |  |  |  | 2 | 17 | Player 17 |  | 10 | Player 8 |  | 2 | 10 | Player 8 |  |  | 2 | 21 | Player 23
 | 11 | Player 9 |  |  |  | 3 | 7 | Player 3 |  | 11 | Player 9 |  | 3 | 11 | Player 9 |  |  | 3 | 7 | Player 3
 | 12 | Player 10 |  |  |  | 3 | 10 | Player 8 |  | 12 | Player 10 |  | 4 | 12 | Player 10 |  |  | 3 | 11 | Player 9
 | 12 | Player 11 |  |  |  | 3 | 12 | Player 11 |  | 12 | Player 11 |  | 5 | 12 | Player 11 |  |  | 3 | 15 | Player 16
 | 12 | Player 12 |  |  |  | 3 | 15 | Player 16 |  | 12 | Player 12 |  | 6 | 12 | Player 12 |  |  | 3 | 21 | Player 22
 | 12 | Player 13 |  |  |  | 4 | 7 | Player 4 |  | 12 | Player 13 |  | 6 | 12 | Player 13 |  |  | 4 | 7 | Player 4
 | 13 | Player 14 |  |  |  | 4 | 11 | Player 9 |  | 13 | Player 14 |  | 5 | 13 | Player 14 |  |  | 4 | 12 | Player 10
 | 14 | Player 15 |  |  |  | 4 | 14 | Player 15 |  | 14 | Player 15 |  | 4 | 14 | Player 15 |  |  | 4 | 14 | Player 15
 | 15 | Player 16 |  |  |  | 5 | 8 | Player 5 |  | 15 | Player 16 |  | 3 | 15 | Player 16 |  |  | 4 | 20 | Player 21
 | 17 | Player 17 |  |  |  | 5 | 12 | Player 10 |  | 17 | Player 17 |  | 2 | 17 | Player 17 |  |  | 5 | 8 | Player 5
 | 18 | Player 18 |  |  |  | 5 | 13 | Player 14 |  | 18 | Player 18 |  | 1 | 18 | Player 18 |  |  | 5 | 12 | Player 11
 |  |  |  |  |  |  |  |  |  | 18 | Player 19 |  | 6 | 18 | Player 19 |  |  | 5 | 13 | Player 14
 |  |  |  |  |  |  |  |  |  | 18 | Player 20 |  | 5 | 18 | Player 20 |  |  | 5 | 18 | Player 20
 |  |  |  |  |  |  |  |  |  | 20 | Player 21 |  | 4 | 20 | Player 21 |  |  | 6 | 9 | Player 6
 |  |  |  |  |  |  |  |  |  | 21 | Player 22 |  | 3 | 21 | Player 22 |  |  | 6 | 12 | Player 12
 |  |  |  |  |  |  |  |  |  | 21 | Player 23 |  | 2 | 21 | Player 23 |  |  | 6 | 12 | Player 13
 |  |  |  |  |  |  |  |  |  | 21 | Player 24 |  | 1 | 21 | Player 24 |  |  | 6 | 18 | Player 19
 | # Players = |  | Number of players can vary between 12 and 68 |  |  |  |  |  |  |  | # Players = |  | Number of players can vary between 12 and 68
 | 3/team = |  | Number of 3/team can vary between 0 and 3 |  |  |  |  |  |  |  | 3/team = |  | Number of 3/team can vary between 0 and 3
 | 4/team = |  | Number of 4/team can vary between 4 and 17 |  |  |  |  |  |  |  | 4/team = |  | Number of 4/team can vary between 4 and 17
 | teams total = |  | Number of teams total can vary between 3 and 17 |  |  |  |  |  |  |  | teams total = |  | Number of teams total can vary between 3 and 17
 |  |  | 4/team is preference with 3/team dependent on remander |  |  |  |  |  |  |  |  |  | 4/team is preference with 3/team dependent on remander
 |  |  | Formula for Team setup is objective by following numbers in [NAME]