Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Seattle, Washington
    Thanked 2 Times in 2 Posts

    Schedule teams (Excel XP)

    I have to schedule ten teams. They each compete every week, on Saturday. Each team has to play every other team. No team can play twice in the same week. I've run into a brick wall <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15> using Excel to schedule. There must be a way to do it. This is not an elimination tournament. I know it will take 9 weeks for all teams to play each other, for a total of 45 competitions.
    Bob Wall

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    New York, New York, Lebanon
    Thanked 1 Time in 1 Post

    Re: Schedule teams (Excel XP)


    Do you play Chess? Oh what a wonderful game, where you have to protect your king and ...Oh sorry I got carried away.

    There are shareware and freeware programs that you can find on the Internet to allow you to do this sort of thing with out having to reinvent the wheel.

    But if you are looking for an excesise in Excel/VBA to do so, well that would be a different situation.

    You may use the Perm function to get the pairs of teams that would play and then subtract them and use the Perm function again and again until you have all teams done.

    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    South Carolina, USA
    Thanked 0 Times in 0 Posts

    Re: Schedule teams (Excel XP)

    If the team names are in A2:A11, and the Dates are in B1:J1, then the following macro will fill in a schedule that I think meets your criteria:

    <pre>Public Sub Schedule()
    Dim I As Long, J As Long
    For J = 1 To 9
    For I = 0 To 9
    Worksheets("Sheet1").Range("A2").Offset(I, J).Value = _
    Worksheets("Sheet1").Range("A2").Offset((I + J) Mod 10, 0).Value
    Next I
    Next J
    End Sub

    Legare Coleman

Posting Permissions

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