+ Reply to Thread
Results 1 to 12 of 12

Team Picker

  1. #1
    Registered User
    Join Date
    06-24-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    1

    Thumbs up Team Picker

    Hi,
    Was wondering if someone could help me? I have been asked by the local golf society to create a Team pairing / generator.
    I want to be able to list all the men - approx 35 members on 1 list
    a second list would contain the the 7 Female members.

    The idea is to pair 3 men and 1 woman idealy based on who turns up on the outing.

    I did find the following spreadsheet online and it generates random team but i have no way of allowing only 1 woman per team.

    I have not got a great deal of VBA / Macro knowledge.

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    149

    Re: Team Picker

    Based on the way this spreadsheet works, the woman should be listed first on the data sheet, which would result in them being assigned 1 per team (unless # of women > # of teams in which case a few would have 2 women randomly assigned).

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Team Picker

    Instead of using a UDF (user defined function) for number of 3 man teams and 4 man teams you could use the following formulas:
    Number of players is in cell C1
    Number of 3 man teams in cell C3: =MOD(4-MOD(C1,4),4) then
    Number of 4 man teams in cell C4: =(C1-(C3*3))/4

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Team Picker

    I play a lot of golf and created a spreadsheet and some code that should handle this problem.
    See the attached. - I hope the attach file worked...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-10-2010
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Team Picker

    Quote Originally Posted by MarvinP View Post
    I play a lot of golf and created a spreadsheet and some code that should handle this problem.
    .
    Hi MarvinP,

    Do you have any good ideas on how to adapt your code to increase the number of groups? Ideally we want to create 4 groups Ladies, Div1, Div2, Div3 so that Ladies would be distributed evenly (as in your original) and then the remaining places filled with respect to Div - so that groups would be filled Lady1, Div3a, Div2a, Div2b then Lady2, Div3b, Div2c, Div2d and Lady3, Div2e,Div1a, Div1b etc so that players generally play within similar standards to each other whilst maintaining the random aspect within the overall structure?

    I have had a look at the code in VB but I am struggling to see where to start,

    Sorry if this seems an impossible question!!

    Any thoughts greatly appreciated.

    Regards,

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Team Picker

    Try this one I made earlier. Click the yellow cells to generate a random selection, no need to delete old selections.
    Please Login or Register  to view this content.

    Hope this helps
    Attached Files Attached Files
    Last edited by Marcol; 12-10-2010 at 04:04 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Registered User
    Join Date
    12-10-2010
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Team Picker

    Hi Marcol

    Thanks for your reply. I am really trying to expand on MarvinP original idea so that, rather than just randomly assigned teams there is more of an element of 'seeding' but without just filling groups from the bottom (lowest handicap) up. Since MarvinP's spreadsheet allows for the Ladies to be treated separately, I am looking for a way to expand the idea so that all the ladies would be spread out across the teams, them Div3 players would primarily be grouped with Div3 and Div2 players and the remaining Div2 players grouped with Div1 players (whilst maintaining 1 Lady per group where there are that many playing) so that groups would look a bit like this:

    Group1:Lady1,Div3a,Div2a,Div2b
    Group2:Lady2,Div3b,Div2c,Div2d
    Group3:Lady3,Div3c,Div2e,Div2f
    Group4:Lady4,Div2g,Div2h,Div1a
    Group5:Div2i,Div2j,Div1b,Div1c (as there are only 4 ladies in this example)
    etc

    where the selections are random from within each of the 4 pools of players (Ladies, Div1, Div2 + Div3)

    Thanks again for your input, much appreciated - if I have misunderstood your post please could you explain a little of how your code would help me to this end.

    Regards

    Jim

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Team Picker

    No you haven't misunderstood, this was just a simple example.

    I'll look through some others I have later, unfortunately they are on a different machine, so I can't look now.

  9. #9
    Registered User
    Join Date
    12-10-2010
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Team Picker

    OK thanks!

    Jim

  10. #10
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Team Picker

    How many names would you typically have in each "division" ?

    i.e.
    Ladies = ?
    Division 1 = ?
    Division 2 = ?
    Division 3 = ?

    Would any division be consistantly greater than the others?

    [EDIT]
    Just noticed.

    Whos' thread is this noelnoone or ballesdegolf, the OP doesn't seem to have reurned any posts.

    I'm a bit confused....
    Last edited by Marcol; 12-13-2010 at 03:02 PM.

  11. #11
    Registered User
    Join Date
    01-28-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Team Picker

    This approach just helped me solve a similar (enough) challenge that required random selection from a list without duplicating any selections. Seems so elegantly simple now, after seeing your solution (macro) play out, but it's bugged me for a while! Thank you!

  12. #12
    Registered User
    Join Date
    09-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Team Picker

    Hi Marvin, I understand this post is almost 5 years old at this point so I hope you are still around or someone else could help. I'd like to modify the formula/vba to prefer threesomes over foursomes. The reason is that I am trying to adapt this Team Picker for assigning teams in my office for random happy hour events and we need an odd number of players. We are a small company so teams of 3 is more conducive to our small team.

    Again, I know this post is almost 5 years old so I am looking for anyones help. Thanks in advance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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