Private Sub Worksheet_Change(ByVal Target As Range)
Dim d As Object, dd As Object, tablo, i&, x$
Set d = CreateObject("Scripting.Dictionary")
Set dd = CreateObject("Scripting.Dictionary")
d.CompareMode = vbTextCompare 'la casse est ignorée
dd.CompareMode = vbTextCompare 'la casse est ignorée
If FilterMode Then ShowAllData 'si la feuille est filtrée
With Range("A4", Range("A" & Rows.Count).End(xlUp)).Resize(, 4)
If .Row < 4 Then Exit Sub
tablo = .Value 'matrice, plus rapide
For i = 1 To UBound(tablo)
x = CStr(tablo(i, 4))
If x <> "" Then d(tablo(i, 2) & tablo(i, 1) & tablo(i, 3)) = x
Next
For i = 1 To UBound(tablo)
x = tablo(i, 2) & tablo(i, 1) & tablo(i, 3)
If dd.exists(x) Then tablo(i, 4) = "" Else tablo(i, 4) = d(x): dd(x) = ""
Next
Application.EnableEvents = False 'désactive les évènements
.Value = tablo 'restitution
Application.EnableEvents = True 'réactive les évènements
End With
End Sub