Hello,

I would love to have a macro that will sort a group of bowlers into equal, or as close to as possible, teams by average. Here are the rules I would need to abide by:

- we generally have between 6 and 20 bowlers
- must always be between 2 - 5 teams
- use a mystery bowler if can't divide the teams evenly (11 players for example)
- only use the "mystery" bowler once (to fill in odd team, e.g. 8 players would be 3 teams of 3 with one mystery bowler on one team)
- mystery bowler's average would equal the teams average
- the team average of each team is as even as possible

I am unable to figure out a macro that can sort the example group below into 3 teams of 4 with one mystery bowler. Or if there were 9 bowlers, to split them into 3 teams of 3. 12 bowlers into 4 teams of 3, etc. All automatically just by putting in their names and averages and executing the macro. Help!

Example team:

Player Overall Average
Jack 185
Jill 158
Chris 149
Paul 172
Scott 159
John 154
Mihir 167
Sally 162
James 156
Hank 165
Perry 162