Sub Conso()
Set liste = CreateObject("scripting.dictionary")
With Feuil1
tablo = .Range("A2:D" & .Cells(Rows.Count, 1).End(xlUp).Row)
For i = 1 To UBound(tablo)
If Left(tablo(i, 4), 1) <> "P" Then
liste(tablo(i, 1) & "#" & tablo(i, 2)) = _
liste(tablo(i, 1) & "#" & tablo(i, 2)) + tablo(i, 3)
Else
End If
Next i
End With
lig = 2
With Feuil3
For Each k In liste.keys
.Cells(lig, 1).Resize(1, 3) = Split(k, "#")
lig = lig + 1
Next k
.[C2].Resize(liste.Count, 1) = Application.Transpose(liste.items)
End With
Sheets("Feuil2").Activate
End Sub