Version définitive pour n lignes au lieu de 10.
Sub Macro1()
Dim i As Integer, j As Integer, k As Integer, nb As Integer
Dim tablo1() As Integer, tablo2(12) As Integer, tablo3(12) As Integer
Dim Compt As Integer, ligne As Integer, nl As Integer
Dim doublon As Boolean
nb = ActiveSheet.Cells(Columns.Count, 7).End(xlUp).Row
' Nombre de combinaisons C3|n
nl = Factorielle(nb) / Factorielle(3) / Factorielle(nb - 3)
ReDim tablo1(nl, 3)
' On met dans un tablo les n combinaisons C3|n
For i = 1 To nb
For j = i + 1 To nb
For k = j + 1 To nb
Compt = Compt + 1
tablo1(Compt, 1) = i
tablo1(Compt, 2) = j
tablo1(Compt, 3) = k
Next k
Next j
Next i
'On prend le tablo ligne par ligne
For i = 1 To UBound(tablo1)
Compt = 0
For j = 1 To 3 ' Colonnes tablo1
ligne = tablo1(i, j)
For k = 1 To 4
Compt = Compt + 1
tablo2(Compt) = Cells(ligne, k + 6)
tablo3(Compt) = Cells(ligne, k + 6)
Next k
Next j
' Recherche des doublons
For j = 1 To 12
doublon = False
For k = 1 To 12
If k > j Then
If tablo3(k) = tablo2(j) Then
doublon = True
Exit For
End If
End If
Next k
If doublon = True Then Exit For
Next j
If doublon = False Then
nl = ActiveSheet.Cells(Columns.Count, 13).End(xlUp).Row + 1
Cells(nl, 13) = tablo1(i, 1)
Cells(nl, 14) = tablo1(i, 2)
Cells(nl, 15) = tablo1(i, 3)
End If
Next i
End Sub
Function Factorielle(nb As Integer)
If nb = 1 Then
Factorielle = 1
Else
Factorielle = nb * Factorielle(nb - 1)
End If
End Function