View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.setup
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default how do I make a sports schedule

You gave not very much details, but if you have a list of teams in A2:A? then
this macro creates a combination of opponents for each team, then you can put
dates of matches in cells B1, C1, etc.


Sub sched()
Dim teams As Range, t As Range, e As Range
Noofteams = Range("A" & Rows.Count).End(xlUp).Row
Set teams = Range("A2:A" & Noofteams)
For Each t In teams
nexte = 0
For Each e In teams
If t < e Then
nexte = nexte + 1
Cells(t.Row, nexte + 1).Value = e.Value
End If
Next e
Next t
End Sub


Regards,
Stefi

€˛SHOETAC€¯ ezt Ć*rta:

i AM TRYING TO MAKE A SPORTS SCHEDULE THAT EACH TEAM PLAYS EACH OTHER ONCE