Sub essaiLaurent950_Test2()
Dim TI As Single
TI = Timer
Dim d As New Scripting.Dictionary
Set d = New Dictionary
d.CompareMode = TextCompare
Dim Tb() As Variant
Tb = Range("a1").CurrentRegion
Dim i As Double
For i = LBound(Tb) + 1 To UBound(Tb)
If d.Exists(Tb(i, 2) & "|" & Tb(i, 3)) Then
d(Tb(i, 2) & "|" & Tb(i, 3)) = d(Tb(i, 2) & "|" & Tb(i, 3)) + Tb(i, 16)
Else
d.Add Tb(i, 2) & "|" & Tb(i, 3), Tb(i, 16)
End If
Next i
'Erase Tb
Dim tempKey() As Variant
Dim tempItem() As Variant
tempKey = d.Keys: tempItem = d.Items
'Set d = Nothing
Dim temp2() As Variant
ReDim temp2(LBound(tempKey, 1) + 1 To UBound(tempKey, 1) + 1, 1 To 3)
For i = LBound(tempKey, 1) To UBound(tempKey, 1)
temp2(i + 1, 1) = Split(tempKey(i), "|")(0)
temp2(i + 1, 2) = Split(tempKey(i), "|")(1)
temp2(i + 1, 3) = tempItem(i)
Next i
[V1].Resize(UBound(temp2, 1), UBound(temp2, 2)) = temp2
MsgBox Format(Timer - TI, "0.000\ sec.")
End Sub