Okay to create a list all combinations of "fixture" matches, place a list of all teams( as I don't know your teams, I used a to k) in column A. Copy the filled range and paste into Column B. Then in cell C1 enter the following formula
=IF(ROW()-ROW($C$1(+1>COUNTA(A:A)*COUNTA(B:B)," ",INDEX(A:A,INT((Row()-ROW($C$1))/COUNTA(B:B)+1)) & "," & INDEX(B:B,MOD(ROW()-ROW($C$1),COUNTA(B:B))=1))
Copy down until no more data is filled. In my test workbook I used 11 teams (a to k), and this filled down to cell C121. Data in Column C will show as a,a a,b a,c etc. Common sense will tell you there are two rules to be applied here, and these are a team cannot play against itself in a Fixture match, and secondly a team cannot play against a team for which it has already played. So we need to find a method/s to remove the incorrect data.
I'm not confident that this code as supplied is correct, and I'm hoping that someone will provide the correct solution.
Sub CheckTeams()
Dim i as Long
Dim lRow as Long
With Sheets("Sheet1")
For i = lRow to 1 step -1
If .cells(I,"C").Value = StrReverse(i,"C").value Then
.Cells(i).Delete
End If
Next I
End With
With Sheets("Sheet1")
For each cell in Range("C1:C & lRow")
If(Left(C& i,1)=Right(C & i,1) Then
.Cells(i).Delete
End If
Next I
End With
End Sub
What I was hoping here in the first part, was to be able to start with the last value in Column C and compare against the string reversed of every other cell and if found then delete the cell you are looking up. And in the second part I am trying to remove a match where a team plays against itself.
As I said earlier, untested and I'm not a coder. For the Code guru's, when you've finished laughing, can you please supply the solution?