So I run a Fantasy League (Yahoo) and this year we are going to have divisions. There are 12 teams with 3 divisions (4 teams in each division). I would like it so that teams play other teams in their division 2 times, and every other team 1 time.I'm trying to figure out how I can come up with a way to output this schedule randomly in a table like in Excel. I'm thinking a macro would be the way to go but I'm not really sure how to do this. Anyone want to take a stab at this or point me in the right direction? Seems like it should be a pretty easy bit of code. Thanks in advance.
8/21/2009 9:57:53 AM
Five seconds of googling and I found this: http://www.grogansports.com/fantsched.aspIf that doesn't work, there are about 189,000 other results you can look through.
8/21/2009 11:48:52 AM
If you don't like Google, you can try Yahoo or Bing.
8/21/2009 12:25:32 PM
Thanks for your help. Wasn't really looking for a set schedule, thought it would be cool to have a random schedule be output in excel or something so I can use it over the years without having the same static schedule.
8/21/2009 12:35:55 PM
What I did (though not completely automated):Created two tables: I numbered the teams so that the first digit is division number (1-3) and the second digit is team number (1-4).The top table counts how many times the teams play each other and uses the formula COUNTIF($B20:$O20,"="&B$1)The lower table is the schedule. I filled in the top row manually and filled the remaining cells with VLOOKUP($A21,B$20:$P20,16-B$19,FALSE). When you enter one game (e.g. 11 vs. 12) the formula fills in the cell for the other team (12 vs. 11).Fill in the games from the top down.
8/21/2009 12:49:08 PM
8/21/2009 1:11:26 PM
Thanks for this example, this could work out pretty well.
8/21/2009 1:20:38 PM
12 lines of java/python/c++/c max. use array lists or vectors as the collection for the teams to avoid complicated logic from using arrays and randomize
8/21/2009 2:41:31 PM
Thanks for all your help. Ernie, why you gotta be a douche bag?
8/21/2009 10:27:51 PM
Ernie doesn't like people.
8/22/2009 8:17:52 AM
8/22/2009 3:57:38 PM
HeyMake a picture like that using an actual photo of meLabel it douchebagAnd have an arrow pointing at my brainThe caption can read "Provided the best answer in this thread, but wasn't very polite about it."
8/22/2009 7:54:26 PM