Pairing selection (1 Viewer)

BobNTN

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2008
Messages
308
Wondering if this is possible in Excel.
I have 40 golfers.
Want to randomly pair them (2 man teams) each day for 3 days but without repeat pairs.
If possible can someone put me on the right track ?

Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:25
Joined
May 7, 2009
Messages
19,169
Please find the attached xlsm file.
There are twi sheets, sheet1 holds the name of the golfers. The reults will be shwon on sheet2.
To view the vba press alt-f11. Click inside generatepair sub then preas f5 to run.
 

Attachments

  • golfers.zip
    16.1 KB · Views: 119
Last edited:

BobNTN

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2008
Messages
308
No attachment
 

BobNTN

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2008
Messages
308
Seems I have totally screwed up in explaining what I am trying to do.
I have a yearly tournament that has anywhere from 36 upwards to 50 players. The regular 3 day tournament is a 2 man team where the same 2 players play together all 3 days.

I am trying to add a 'side' tournament where each player would be paired with a different partner each of the 3 days and of course, separate scoring method for that side tournament.
So, hopefully I can get it right this time.
example - Players 1 and 2 are partners for all 3 days for the main tournament.
Also in the side tournament, player 1 would be paired with one of the other, in this instance, 38 players for the first day, 1 of the 37 players the second day, and one of the 36 players the third day.
So he would never be paired with his normal partner in the side tournament and would never have the same partner any two days.
I would assume in your code, if the total number of players changed to, say, 46, I would need to change the "for j = 1 to 40" statement to 1 to 46 ?
Also is there a way to add a button to run the macro ?
Thank you so much and I humbly apologize for not explaining it all.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:25
Joined
May 7, 2009
Messages
19,169
sorry for the late reply.
you had me thinking there.
on the attached sample, you will manually put the pairs (regular tourney) to sheet1.
for side tourney, go to sheet2 and click the command button.
the code is not optimised, so be patient with the result.
 

Attachments

  • golfers.zip
    25.9 KB · Views: 137

BobNTN

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2008
Messages
308
That appears to work great.
Wish I understood all that.

Thank you so much.
 

BobNTN

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2008
Messages
308
One more question.
I have a file with 10 or 12 worksheets that I run off of one sheet with names on it, handicaps, etc.
Is there a way I can copy this into that workbook as additional worksheets and still maintain the code ? That way I can use my main player list for it to run from.
 

BobNTN

Registered User.
Local time
Today, 05:25
Joined
Jan 23, 2008
Messages
308
sorry for the late reply.
you had me thinking there.
on the attached sample, you will manually put the pairs (regular tourney) to sheet1.
for side tourney, go to sheet2 and click the command button.
the code is not optimised, so be patient with the result.

As a matter of information, now that my tournament is coming up, I used this and ultimately found that it will duplicate players. I also found using the formula
=INDEX(range of names,MRAND()) in the number of cells I want results in it works great without VBA but does not restrict the team partners from being in the same 4 man draw.
Still working on that.
 

Users who are viewing this thread

Top Bottom