+ Reply to Thread
Results 1 to 6 of 6

Generating Unique Groups of 4

  1. #1
    Registered User
    Join Date
    12-24-2013
    Location
    lancaster, pa
    MS-Off Ver
    Excel 2003
    Posts
    74

    Generating Unique Groups of 4

    Hello,
    I'm trying to take a list of 20 people who are participating in a community tournament and breaking them out into unique groups of 4, 5 groups total. The end goal is to have everybody vs each other once (round robin style). We are breaking it into groups so each person knows who they need to play in week 1, week 2, etc.. So its not just a free-for-all. Can someone help me out? I've looked around the web and haven't found what I was looking for, and have little excel experience.

    Thanks for taking a look!

    Bob V.
    Tony S.
    Jamie R.
    Megan L.
    Gene C.
    Mary P.
    Michelle W.
    Taylor A.
    Dan S.
    Justin S.
    Dan R.
    Ryan T.
    Kevin H.
    Andrew B.
    Jeff D.
    Matt J.
    Becky S.
    Mary Z.
    Kevin C.
    Chris P.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Generating Unique Groups of 4

    So when you say groups of 4 or 5 playing each other, do you mean breaking everyone up into different teams? And do those teams stay constant throughout the tournament? how many teams? how many games?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: Generating Unique Groups of 4

    Quote Originally Posted by Clarkit View Post
    Hello,
    I'm trying to take a list of 20 people who are participating in a community tournament and breaking them out into unique groups of 4, 5 groups total. The end goal is to have everybody vs each other once (round robin style). We are breaking it into groups so each person knows who they need to play in week 1, week 2, etc..
    I'm not clear about what you envision. As I understand this tournament is one-on-one competition. I've got that part completed. With 190 unique pairings I'm confused by what you mean "unique groups of 4, 5 groups total". Unique groups of 4(?) as I envision it would be 47.5 groups. On the other hand 5 groups total would be 5 groups of 38(?).

    It would be helpful if you uploaded an Excel file with some hand typed examples of what you envision. Please don't post pictures. Many of us cannot view them (browser limitations, company firewalls, etc.) and it saves having to re-type data. This also answers questions at a glance, and (hopefully) gets you a faster answer.

    Thanks.
    Dave

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Generating Unique Groups of 4

    The following code is used to generate all possible groupings of 4 people without a person being on the same team as himself. One of the problems is that it produces duplicate teams. E.g. 1-2-3-4, 1-3-4-2, 4-3-2-1, etc. To solve that problem I use an Excel Table. The teams are generated in columns A-D. I then "sort" using the Small function in columns E-H and make a "composite" string in column I. I then use the formula in column J to weed out duplicates.

    I set n to 8 so I could QA it better. You will need to set it to 20 which means it will run exponentially slower.

    This is half the battle. This gives you a list of unique teams. Now you need a schedule of team vs. team that doesn't involve anyone playing against himself on the opposite team. To accomplish this, I suggest making a table of each possible team pairing and then checking to make sure that the numbers in one team are not on the other team. This will give you legitimate matchups. Some of the same logic as used in the team developer can be used in this endeavor. I may, if I have time, give this a shot.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Generating Unique Groups of 4

    I no sooner "hung up the phone" on this thread when I got the idea. Once again, brute force and Excel tables came to the rescue. I copied the good team combinations to another table. Then I used the following code to make every possible matchup.

    Then I parsed out the team players on the first team, into columns F-I and used ISNUMBER(FIND()) to see if the member was on the other team in Columns J-M. I used NOT(OR(j-M)) to determine which pairings are legitimate.

    [Edit] Upon further review, the ruling on the field is overturned. I have duplicates . I'll have to eliminate them the same way as I eliminated duplicate teams.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by dflak; 12-02-2015 at 04:31 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Generating Unique Groups of 4

    People numbered 1 to 20, 5 rounds of 5 4-player teams:

    [ 1 2 3 4 | 5 6 7 8 | 9 10 11 12 | 13 14 15 16 | 17 18 19 20 ]

    [ 1 5 9 13 | 2 6 10 17 | 3 7 14 18 | 4 11 15 19 | 8 12 16 20 ]

    [ 1 6 15 20 | 2 5 12 18 | 3 9 16 19 | 4 7 10 13 | 8 11 14 17 ]

    [ 1 10 16 18 | 2 8 13 19 | 3 5 11 20 | 4 6 9 14 | 7 12 15 17 ]

    [ 1 12 14 19 | 2 7 9 20 | 3 8 10 15 | 4 5 16 17 | 6 11 13 18 ]

    Results from a family of solutions to the Social Golfer Problem published by Warwick Harvey.
    Last edited by shg; 12-02-2015 at 05:34 PM.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. generating Unique ID from textboxs on userform
    By Learning ExL in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-05-2015, 11:44 PM
  2. [SOLVED] Generating unique sequential numbers using VBA
    By onwell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 11:15 AM
  3. Unique ID/Number generating
    By benzmar in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-14-2012, 12:31 AM
  4. [SOLVED] Generating unique random number
    By Fuhgawz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-09-2012, 05:26 PM
  5. Using Excel for Generating Unique Reports
    By victorc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-28-2009, 09:32 AM
  6. Generating unique pairs from a set of numbers
    By mistermat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-31-2008, 07:02 AM
  7. Generating graphs from multiple groups of data by vba
    By deadfish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2007, 12:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1