Random Draw

Fraserj

Board Regular
Joined
Nov 29, 2015
Messages
63
I want to create a champions League style group draw if possible through spreadsheet
As i'm a beginner to excel I don't have a clue how to do this and I am willing to learn if possible

I have 16 teams in columns A1 to A16
I have a seeded section ranging from 1 to 4 with the aim of creating 4 group tables, as shown below
Manchester
1
Liverpool
1
Arsenal
1
Chelsea
2
Tottenham
2
Leicester
3
Villa
3
Sunderland
3
Newcastle
4
Southampton
4

<tbody>
</tbody>

I want each team not to able to draw a team with the same seeded number
for example, Liverpool, Chelsea, Villa and Southampton can all be in the same group, but Manchester and Liverpool can't
Would really appreciate any input for this one.

Thank you in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Here's one way to do it:

ABCDEFGH
1A1Group 1Group 2Group 3Group 4
2B2IAJH
3C3GBLK
4D4CFNM
5E4PEOD
6F3
7G2
8H1
9I1
10J1
11K2
12L2
13M3
14N3
15O4
16P4

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Array Formulas
CellFormula
E2{=INDEX($A:$A,SMALL(IF(($B$1:$B$16=ROWS(E$2:E2))*(ISNA(MATCH($A$1:$A$16,F2:$I2,0))),ROW($B$1:$B$16)),RANDBETWEEN(1,COLUMNS($E2:E2))))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Enter the formula in E2 and confirm with Control-Shift-Enter. Then copy E2 and paste it across and down. Then just press F9 (recalculate) to get a new set of groups.

The formula essentially starts in H2. It compiles a list of all the #1 seeds, and randomly picks one. In G2, it compiles a list of all #1 seeds, excludes what's been picked already (H2), and randomly picks one. And so on. Row 2 will be the #1 seeds, Row 3 is the #2 seeds, etc.

Let me know if this is what you're looking for.
 
Upvote 0
That's spot on.... If the group isn't seeded... is it possible to delete numbers and do a completely random draw or...?
 
Upvote 0
If you have an unseeded group, there's several ways. You could put the list of teams in column A, then put =RAND() in column B, copied down, then sort the columns by B.

Converting the existing formulas to handle seeds or non-seeds would be tricky. If you want a similar type formula, try this one:

ABCDEFGHIJKL
1A1Group 1Group 2Group 3Group 4Random Draw
2B2IAHJGroup 1K
3C3KBLGM
4D4FMNCD
5E4ODPEO
6F3Group 2I
7G2F
8H1C
9I1P
10J1Group 3A
11K2N
12L2G
13M3J
14N3Group 4L
15O4E
16P4B
17H

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Array Formulas
CellFormula
L2{=INDEX($A:$A,SMALL(IF(ISNA(MATCH($A$1:$A$16,$L$1:$L1,0)),ROW($A$1:$A$16)),RANDBETWEEN(1,ROWS(L2:L$17))))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Put the formula in L2, confirm with Control+Shift+Enter, and copy down. The first four cells are Group 1, etc. Like the other formulas, this recalculates every time you push F9.
 
Upvote 0
The first one works... although, whenever I type a new thing into any cell, it updates the groups and randomly draws them again "/

How do I get around this?
 
Upvote 0
Unfortunately RANDBETWEEN() is a volatile function which means the draw will change if you change *any* cell in the sheet. The only way to avoid this is to use a UDF but then you're in VBA territory ...

WBD
 
Upvote 0
****, can't use VBA as it's going to be a file on my phone... can't be carrying my laptop around, and even on a tablet you don't get the full version of Excel
 
Upvote 0
WBD is right about the volatile part, and if you can't use VBA, that makes it tougher. About the only thing I could suggest is when you get a set of groups you want, then you copy them, and do a Paste Special > Values somewhere else on your sheet.
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top