True round-robin tournament
Mark G asks in Create a random playlist in excel:
Can this example be modified to create a true round-robin draw?
i.e. using a 6 team scenario, for any round there will be three games/matches, but obviously, Team A could not compete against say Team B and Team C during that round as can occur using the above formula.
Answer:
This example is based on a double round-robin in which every team plays all others in its league once at home and once away randomly.
The picture above shows two playlists, the random playlist is the right one. Each round is divided using conditional formatting.
The worksheet is dynamic meaning you can have more or less teams and the worksheet will automatically generate a random playlist for you.
You can get the workbook at the end of this article.
How to use this workbook
The first playlist table is not random, it simply lists all possible matches for the entered team names. The second list is random.
You type the team names in column B in the Excel defined Table. It automatically expands when new values are entered, you don't need to adjust any formulas or cell references.
Add team names
Simply type the next Team name in the first empty cell below the table.
Delete team names
To delete a name in the Excel defined table you need to select the cells you want to delete.
Then press with right mouse button on on the selected range.
Press with mouse on "Delete" and then press with left mouse button on "Table Rows".
If you accidentally press with left mouse button on "Table Columns", don't freak out. Simply press CTRL + z to undo.
Edit team names
You can edit the existing team names as well, the formulas are dynamic and return the correct names in the playlist instantly.
Generate the tournament playlist
There is a button to the right of the playlists.
Press with left mouse button on the button to automatically generate a new random playlist determined by the number of teams you have entered in column B.
When you have a playlist you are happy with copy it and paste it to a new worksheet.
What does this workbook contain to make this possible?
Formula in cell D3 and below:
Formula in cell E3 and below:
Formula in cell F3 and below:
Formula in cell H3 and below:
Formula in cell I3 and below:
Formula in cell J3 and below:
Formula in cell K3 and below:
Hidden formula in cell L3 and below:
Hidden formula in cell M2:
Hidden formula in cell M3 and cells below:
VBA Macro
The random playlist sometimes returns error values, the following code verifies that no errors occur.
Sub GeneratePlayList() Application.ScreenUpdating = False Do Calculate DoEvents Loop While Worksheets("Sheet1").Range("M2") <> 0 Application.ScreenUpdating = True End Sub
Random category
Question: How do I create a random list of unique numbers from say 1 to 10, without using VBA and […]
This article describes how to create a random playlist based on a given number of teams using an array formula. […]
Mark G asks: 1 - I see you could change the formula to have the experssion COUNTIF($C$1:C1, $E$2:$E$5)<5 changed so […]
Tournament category
This article demonstrates macros that create different types of round-robin tournaments. Table of contents Basic schedule - each team plays […]
Excel categories
2 Responses to “True round-robin tournament”
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Good day Oscar
This is a great help! Thanks.
I've been trying to replicate this Round Robin Tournament in Google sheets, but have not succeeded. How well do you know google sheets? Would you mind doing one for google sheets. It would be a great help. Otherwise ill keep trying.
Kind Regards
Shaun Jolly
Is it possible to create a round-robin draw equal and alternating home and away. I have used Ian Wakeling's Round Robin Scheduler (IanBalancedRoundRobin_v5_1.xlsm) but it doesn't display as two columns with Home & Away. This way I can pair teams who share the same venue.