Sub Calcul()
Dim inf, sup, A, ua&, B, ub&, C, uc&, D, ud&, E, ue&, F, uf&, liste$(), aa&, bb&, cc&, dd&, ee&, ff&, s1#, s2#, mem2#, i%, mem1#()
inf = [B1]
sup = [B2]
A = [C5].CurrentRegion: ua = UBound(A)
B = [G5].CurrentRegion: ub = UBound(B)
C = [K5].CurrentRegion: uc = UBound(C)
D = [O5].CurrentRegion: ud = UBound(D)
E = [S5].CurrentRegion: ue = UBound(E)
F = [W5].CurrentRegion: uf = UBound(F)
ReDim liste(0)
For aa = 1 To ua
For bb = 1 To ub
For cc = 1 To uc
For dd = 1 To ud
For ee = 1 To ue
For ff = 1 To uf
s1 = A(aa, 2) + B(bb, 2) + C(cc, 2) + D(dd, 2) + E(ee, 2) + F(ff, 2)
If s1 >= inf And s1 <= sup Then
s2 = A(aa, 3) + B(bb, 3) + C(cc, 3) + D(dd, 3) + E(ee, 3) + F(ff, 3)
If s2 > mem2 Then
i = 0
ReDim liste(0): ReDim mem1(0)
liste(0) = A(aa, 1) & "-" & B(bb, 1) & "-" & C(cc, 1) & "-" & D(dd, 1) & "-" & E(ee, 1) & "-" & F(ff, 1)
mem1(0) = s1
mem2 = s2
ElseIf s2 = mem2 Then
i = i + 1
ReDim Preserve liste(i): ReDim Preserve mem1(i)
liste(i) = A(aa, 1) & "-" & B(bb, 1) & "-" & C(cc, 1) & "-" & D(dd, 1) & "-" & E(ee, 1) & "-" & F(ff, 1)
mem1(i) = s1
End If
End If
Next ff, ee, dd, cc, bb, aa
'---restitution---
Application.ScreenUpdating = False
[K1].Resize(3, Columns.Count - 10).Delete xlToLeft
[G1:J3] = ""
If liste(0) = "" Then Exit Sub
For i = 0 To UBound(liste)
[G1:J3].Copy [G1].Offset(, 4 * i)
[G1].Offset(, 4 * i) = liste(i)
[G2].Offset(, 4 * i) = mem1(i)
[G3].Offset(, 4 * i) = mem2
Next i
End Sub