Sub Test()
Dim t() As Variant
f = Range("a65536").End(xlUp).Row
Range(Cells(2, 3), Cells(f, 3)).Clear
t = Range(Cells(2, 1), Cells(f, 3))
For i = 1 To UBound(t, 1)
x = i + 1
For j = x To UBound(t, 1)
If t(i, 2) = t(j, 2) Then
t(j, 3) = t(j, 3) + 1
End If
Next j
Next i
For i = 1 To UBound(t, 1)
If t(i, 3) = Empty Then
t(i, 3) = t(i, 2)
ElseIf t(i, 3) <> Empty Then
t(i, 3) = 0
End If
Next i
'Restitution de la colone 3 uniquement (Merci à Boisgontier)
Cells(2, 3).Resize(UBound(t, 1)) = Application.Index(t, , 3)
End Sub