+ Reply to Thread
Results 1 to 8 of 8

Randomly allocate players into Teams

  1. #1
    Registered User
    Join Date
    01-05-2014
    Location
    Nth Queensland, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Randomly allocate players into Teams

    I am trying to create a worksheet in Excel 2010 where people are to be put into teams - could be 3 to a team one week and then 2 the following week(maximum number of players to a team will never exceed 4ppl). Team sizes will be wholly dependant on the number of people (some weeks there may be an uneven number of players ie 21 players but it is a 2 player per team round), but it is rare or at least a very long night if we have more than 18 teams. The number of teams and players to a team will also vary on a weekly basis and to add to my joy there are rules in which I need to ensure that no two team members have played together in the previous 6 months and that only one female to a team.
    I have created a worksheet (Membership), that will have the members details listed so that I can identify males/females (Column E). On another worksheet (MainPage) which is to be the front page in which the people’s names will be entered in manually(cells C8:C31, H8:H31) and on the same worksheet the number of players to a team will be entered (cell O3).
    What I was hoping to do was somehow lookup the list of names and based on the number entered in Cell O3 (No of players to team) of the Mainpage worksheet, allocate players to teams which are then listed on Mainpage worksheet in cells M7 through to P24
    M7:P7= Team 1 Player 1:Player 4,
    M8:P8= Team 2 Player 1:Player 4 etc,
    And then the data also copied across to another worksheet (TeamsHistory) which will record the date and team members for reference to ensure I can meet the rule of members not playing together in previous 6 months.
    I know this is a big ask and I thank you all for the help in advance but silly me offered to assist with my husband’s darts club with entering the electronic age before I realized the logistics of what I was in for. (I know some of you may have been wondering what kind of teams I was organizing) most of the stuff that I need is pretty standard but as for writing the code for this to happen is way beyond my intelligence.


    Again thank you for any help you are able to give me

    Eages

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Randomly allocate players into Teams

    Hi Eages, for such request, it is better you attach a sample workbook. There are several reasons for this necessity.

    - We know you have a worksheet named Membership, we also know member's gender is in column E, but we have no idea where are the names, etc.
    - We know you enter names manually into C8:C31 and H8:H31 of MainPage worksheet, but what are these 2 ranges? why 2 ranges of names?
    - So what happens if the total number of players is not a multiple of cell O3 (No of players in a team)? Is the extra person(s) randomly assigned to teams or do they form up a last incomplete team?
    - We know TeamsHistory worksheet contains the records of previous team set-ups and date, but which column is which?

    Then again, this is to help helpers help you, does not guarantee you a working solution. I will try my best though.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    01-05-2014
    Location
    Nth Queensland, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Randomly allocate players into Teams

    Thank you Millz for getting back to me and yes I fully understand why you need the workbook - silly me didn't think at the time.

    Please see attached

    thank you for taking the time to help me, It is greatly appreciated

    Eages
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Randomly allocate players into Teams

    suppose 16 players and teams of 4 and a period of 6 months in which 2 players can not play together and you play every week,
    i think that's impossible. After max 2 months you're blocked.

  5. #5
    Registered User
    Join Date
    01-05-2014
    Location
    Nth Queensland, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Randomly allocate players into Teams

    bsalv

    We have in total about 60 members however not everyone attends on a weekly basis and most weeks it is two players to a team.

    I guess however if it came to the point that we had all played in teams together then I would need something to be able to override that rule.

    Wow this is becoming a bigger problem than I had thought >> Mental note. never put my hand up for anything again.

    Thanks for bringing that it light for me bsalv

    Eages

  6. #6
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Randomly allocate players into Teams

    i promiss you nothing yet, it's for next weekend.

  7. #7
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Randomly allocate players into Teams

    Hi Eages, I did not extensively test this, I don't know what the results would be like with ~60 members and 6 months history. This should get you going somewhere though, try it.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Randomly allocate players into Teams

    a little bit late, but here is my schedule.
    - In "Membership" i need 2 columns "Nickname" and "***". If later you have an unknown person in "Main Page" I assume it's a male.
    - In Main page you enter all your nicknames in C8:C55, in C3 and O3 your date and number of players to a team. When you change 1 of both, cells S3:S4 are cleared (see later).
    - Now push the button "Allocate teams". The programme makes 500 trials to make a schedule and chooses the best one. The teams appear in M7:P24 and the 10 worst couples appear in S3. There you see 10 numbers with "|" as separator. If the first number is for example 5.000, that means that the worst couple of people played together 5 days ago. The next number is for the second worst couple etc. Do you understand this ?
    - you can push that button a second time, perhaps the result will be better than the first time and then it overwrites your teams and S3, otherwise you see the result in S4. You can push that button several times.

    Then I don't know what you want to do with this names, but if you run the macro "played", the program copies the couples to a table in "team history". That table is the source for the pivottable in that same worksheet. There you see how many times a couple played together and the last date.

    For testing i made a macro "test", where in a loop you play with those names from the 1st january untill the last of january.
    Try that one and if something isn't clear ask it me.
    Attached Files Attached Files

+ 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. Macro for making golf teams randomly
    By rwhite713 in forum Excel General
    Replies: 13
    Last Post: 03-08-2015, 02:32 PM
  2. Use Excel to randomly assign teams to sports competitions
    By Waldo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2013, 02:10 AM
  3. [SOLVED] Two columns of teams, count the number of times the teams meet?
    By tpe102 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-04-2013, 09:21 AM
  4. [SOLVED] IF formula to assign players to teams based on age & weight
    By redstripe87 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-22-2013, 08:20 AM
  5. Creating Lists of Players on certain Teams
    By klj27 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2010, 02:05 PM

Tags for this Thread

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