JenniferMurphy
Well-known Member
- Joined
- Jul 23, 2011
- Messages
- 2,691
- Office Version
- 365
- Platform
- Windows
Once a month, each member of our tennis group submits the days that they are available to play doubles. The person in charge of court scheduling then assigns the available players to a court. We have been doing this for years. The scheduler tries to mix up the players so that we each one gets a chance to play with as many dfferent players as possible.
I thought it might be interesting to tally the number of times each player has been paired with each other player. With N players, there would be N * (N-1) / 2 2-player pairings. We have about 20 players. That would be 19 pairings.
Here is some sample data with just 6 players (= 15 pairings). There are 3 tables. TblPlayers is a list of the players. TblCourts is a list of the court assignments. TblTallies is a list of the pairings with tallies for each. The first 2 tables are the input data. TblTallies is the one that needs to be generated. I don't see any way to do that in Excel, so my plan is to write a macro. I would appreciate any suggestions.
I added the table names aboe each table because xl2bb does not report table names.
I thought it might be interesting to tally the number of times each player has been paired with each other player. With N players, there would be N * (N-1) / 2 2-player pairings. We have about 20 players. That would be 19 pairings.
Here is some sample data with just 6 players (= 15 pairings). There are 3 tables. TblPlayers is a list of the players. TblCourts is a list of the court assignments. TblTallies is a list of the pairings with tallies for each. The first 2 tables are the input data. TblTallies is the one that needs to be generated. I don't see any way to do that in Excel, so my plan is to write a macro. I would appreciate any suggestions.
Tennis Pairings.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | |||
3 | TblPlayers | TblCourts | TblTallies | |||||
4 | Name | Court Assignment | Pairing | Tally | ||||
5 | Debbie | Jill Nancy Debbie Emily | Emily Linda | 0 | ||||
6 | Emily | Susan Jill Debbie Linda | Emily Jill | 1 | ||||
7 | Jill | Nancy Jill Debbie Linda | Linda Susan | 1 | ||||
8 | Linda | Nancy Susan Emily Debbie | Emily Susan | 1 | ||||
9 | Nancy | Debbie Nancy Susan Jill | Linda Nancy | 1 | ||||
10 | Susan | 5 | Debbie Emily | 2 | ||||
11 | 6 | Debbie Linda | 2 | |||||
12 | Emily Nancy | 2 | ||||||
13 | Jill Linda | 2 | ||||||
14 | Jill Susan | 2 | ||||||
15 | Nancy Susan | 2 | ||||||
16 | Debbie Susan | 3 | ||||||
17 | Jill Nancy | 3 | ||||||
18 | Debbie Jill | 4 | ||||||
19 | Debbie Nancy | 4 | ||||||
20 | 15 | 30 | ||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D10 | D10 | =SUBTOTAL(103,[Court Assignment]) |
B11 | B11 | =SUBTOTAL(103,[Name]) |
F20 | F20 | =SUBTOTAL(103,[Pairing]) |
G20 | G20 | =SUBTOTAL(109,[Tally]) |
I added the table names aboe each table because xl2bb does not report table names.