Private Sub Worksheet_Activate()
Worksheet_Change [A1] 'lance la macro
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim F As Worksheet, dest As Range, d As Object, col%, tablo, i&, x$, resu$(), n&
Set F = Feuil1 'CodeName
Set dest = [E1] '1ère cellule du tableau des résultats
Application.ScreenUpdating = False
Application.EnableEvents = False 'désactive les évènements
If FilterMode Then ShowAllData 'si la feuille est filtrée
dest(2).Resize(Rows.Count - dest.Row, 2).Delete xlUp 'RAZ
Set d = CreateObject("Scripting.Dictionary")
For col = 1 To 2
tablo = F.Cells(1, col).Resize(F.Cells(F.Rows.Count, col).End(xlUp).Row, 2) 'matrice, plus rapide, au moins 2 éléments
d.RemoveAll 'RAZ
For i = 2 To UBound(tablo)
x = tablo(i, 1)
If x <> "" Then d(x) = "" 'liste sans doublon
Next i
tablo = Cells(1, col).Resize(Cells(F.Rows.Count, col).End(xlUp).Row, 2) 'matrice, plus rapide, au moins 2 éléments
ReDim resu(1 To UBound(tablo), 1 To 1)
n = 0 'RAZ
For i = 2 To UBound(tablo)
x = tablo(i, 1)
If x <> "" And Not d.exists(x) Then n = n + 1: resu(n, 1) = x
Next i
'---restitution---
If n Then dest(2, col).Resize(n) = resu
dest.Resize(n + 1, 2).Borders.Weight = xlThin 'bordures
Next col
Application.EnableEvents = True 'réactive les évènements
End Sub