Private Sub CommandButton2_Click()
Dim C As Integer, TInt(), TDon(), LD As Long, LI As Long, TRésu(), SGrCA As SsGr, SGrDsgn As SsGr, _
SGrS As SsGr, ÀProduire As Boolean, NbTrouvés As Long, LR As Long
ReDim TInt(1 To 4 * Me.UsedRange.Rows.Count, 1 To 3)
TDon = Feuil2.[A2:B2].Resize(Feuil2.Cells(2 ^ 20, "A").End(xlUp).Row - 1).Value
For LD = 1 To UBound(TDon, 1)
LI = LI + 1
TInt(LI, 1) = TDon(LD, 1)
TInt(LI, 2) = TDon(LD, 2)
TInt(LI, 3) = "A"
Next LD
For C = 1 To 3
TDon = Me.Cells(2, C).Resize(Me.Cells(2 ^ 20, C).End(xlUp).Row - 1).Value
For LD = 1 To UBound(TDon, 1)
LI = LI + 1
TInt(LI, 1) = Left$(TDon(LD, 1), 3)
TInt(LI, 2) = Mid$(TDon(LD, 1), 5)
TInt(LI, 3) = "B"
Next LD, C
ReDim TRésu(1 To LI, 1 To 3)
MGigogne.DernièreLigneÀIndexer = LI
For Each SGrCA In Gigogne(TInt, 1, 2, 3)
For Each SGrDsgn In SGrCA.Co
ÀProduire = False: NbTrouvés = 0
For Each SGrS In SGrDsgn.Co
If SGrS.Id = "A" Then
ÀProduire = True
Else
NbTrouvés = SGrS.Count
End If
Next SGrS
If ÀProduire Then
LR = LR + 1
TRésu(LR, 1) = SGrCA.Id
TRésu(LR, 2) = SGrDsgn.Id
TRésu(LR, 3) = NbTrouvés
End If
Next SGrDsgn, SGrCA
Feuil2.[E2:G2].Resize(2 ^ 20 - 1).ClearContents
Feuil2.[E2:G2].Resize(LR).Value = TRésu
End Sub