Bonjour
Un essai à tester. Te convient-il ?
Option Explicit
Dim f As Worksheet, tablo, tabloR(), dico As Object
Dim i&, j&, k&, derln&, derlnR&, derCol&, qte!
Sub BoutonPourRecapitulatif()
Set dico = CreateObject("Scripting.Dictionary")
derlnR = 0
For Each f In Worksheets
If f.Name <> ActiveSheet.Name And f.Range("A16").Value = "Code E.A.N." Then
derlnR = derlnR + f.Range("E" & Rows.Count).End(xlUp).Row
End If
Next f
derCol = Cells(10, Columns.Count).End(xlToLeft).Column
ReDim tabloR(1 To derlnR, 1 To Cells(10, Columns.Count).End(xlToLeft).Column)
k = 0
For Each f In Worksheets
If f.Name <> ActiveSheet.Name And f.Range("A16").Value = "Code E.A.N." Then
derln = f.Range("E" & Rows.Count).End(xlUp).Row
tablo = f.Range(f.Cells(17, 1), f.Cells(derln, derCol))
For i = 1 To UBound(tablo, 1)
If tablo(i, 1) <> "" Then
If dico.exists(tablo(i, 1)) Then
qte = IIf(tablo(i, UBound(tablo, 2)) = "", 0, tablo(i, UBound(tablo, 2)))
dico(tablo(i, 1)) = dico(tablo(i, 1)) + qte
Else
dico(tablo(i, 1)) = tablo(i, UBound(tablo, 2))
For j = 1 To derCol - 1
tabloR(k + 1, j) = tablo(i, j)
Next j
k = k + 1
End If
End If
Next i
End If
Erase tablo
Next f
Range("A11").CurrentRegion.Offset(1, 0).ClearContents
Range("A11").Resize(UBound(tabloR, 1), UBound(tabloR, 2)) = tabloR
Range("G11").Resize(dico.Count, 1) = Application.Transpose(dico.items)
End Sub
Bye !