Bonjour,
La lecture de la bible ça t'inspire pas hein !
Dim d1
Sub Stat()
Set d1 = CreateObject("Scripting.Dictionary")
Set f1 = Sheets("données")
NCol = 8
a = f1.[a1].CurrentRegion.Offset(, 4).Resize(, 8)
Totalise a
Set F2 = Sheets("result")
f1.[a1].Resize(, 12).Copy F2.[a1]
F2.[E2].Resize(d1.Count, 1) = Application.Transpose(d1.keys)
F2.[F2].Resize(d1.Count, NCol - 1) = Application.Transpose(Application.Transpose(d1.items))
F2.[K1].Sort Key1:=F2.[K2], Order1:=xlDescending, Header:=xlYes
F2.Activate
End Sub
Sub Totalise(a)
ReDim Titem(1 To UBound(a, 2)) ' table des items d'une clé
For ligne = 2 To UBound(a)
crit = a(ligne, 1)
If Not d1.exists(crit) Then For k = 1 To UBound(a, 2): Titem(k) = 0: Next k: d1(crit) = Titem
For k = 1 To UBound(a, 2): Titem(k) = d1.Item(crit)(k): Next k
For col = 2 To UBound(a, 2)
If a(ligne, col) <> "" Then Titem(col - 1) = Titem(col - 1) + Val(a(ligne, col))
Next col
d1.Item(crit) = Titem
Next ligne
End Sub
Attention au Dim d1 avant la Sub Stat()
Les feuilles ont été renommées "données" et "result"
Pour la ville et le dépôt je te laisse le bricolage...
A+