1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Sub Combinaisons()
Application.ScreenUpdating = False
Range("A2:C100000").ClearContents
'Constitution liste impaire
L = 2
For i = 1 To 25 Step 2
For j = i + 2 To 25 + 2 Step 2
For k = j + 2 To 25 + 4 Step 2
Cells(L, "A") = Cells(1, i) & "_" & Cells(1, j) & "_" & Cells(1, k)
L = L + 1
Next k, j, i
'Constitution liste paire
L = 2
For i = 2 To 28 Step 2
For j = i + 2 To 28 + 2 Step 2
Cells(L, "B") = Cells(1, i) & "_" & Cells(1, j)
L = L + 1
Next j, i
'Assemblage des combinaisons
DerLig_A = [A2].End(xlDown).Row
Derlig_B = [B2].End(xlDown).Row
L = 2
For i = 2 To DerLig_A
For j = 2 To Derlig_B
Cells(L, "C") = Cells(i, "A") & "_" & Cells(j, "B")
L = L + 1
Next j, i
End Sub |
Partager