Private Sub Worksheet_Activate()
Dim d As Object, w As Worksheet, x$
Set d = CreateObject("Scripting.Dictionary")
d.CompareMode = vbTextCompare 'la casse est ignorée
For Each w In Worksheets
If LCase(w.Name) <> "total" Then
x = Trim(w.Range("B2"))
If x <> "" Then d(x) = d(x) + Val(Replace(w.Range("AB2"), ",", "."))
End If
Next
'---restitution---
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [B2] '1ère cellule de destination, à adapter
If d.Count Then
.Resize(d.Count) = Application.Transpose(d.keys) 'Transpose est limitée à 65536 lignes
.Offset(, 1).Resize(d.Count) = Application.Transpose(d.items)
End If
.Offset(d.Count).Resize(Rows.Count - d.Count - .Row + 1, 2).ClearContents 'RAZ en dessous
End With
End Sub