Salut caribou44,
Double-clic sur la feuille pour démarrer la macro.
Quelque chose me dit qu'il va falloir adapter...
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'
Dim tData
'
Cancel = True
tData = Range("A1:B" & Range("A" & Rows.Count).End(xlUp).Row + 1).Value
For x = 1 To UBound(tData, 1)
If tData(x, 2) = 0 Then
iIdx = 0
For y = x To UBound(tData, 1) - 1
If tData(y, 1) = tData(x, 1) Then
iIdx = iIdx + 1
tData(y, 2) = iIdx
End If
Next
End If
Next
Range("A1").Resize(UBound(tData, 1), 2).Value = tData
'
End Sub
A+