Sub essai()
Set MonDico = CreateObject("Scripting.Dictionary")
For Each c In [a2:B1000]
If Not MonDico.Exists(c.Value) And c.Value <> "" Then MonDico.Add c.Value, c.Value
Next c
[D2].Resize(MonDico.Count, 1) = Application.Transpose(MonDico.items)
End Sub
Sub test()
Dim Lig As Long, Trouve As Range
Application.ScreenUpdating = False
For Lig = [B65536].End(xlUp).Row To 2 Step -1
Set Trouve = Columns("A").Find(Range("B" & Lig).Value, LookIn:=xlValues, lookat:=xlWhole)
If Trouve Is Nothing Then Range("B" & Lig).Delete xlShiftUp
Next
End Sub
Sub Communs()
a = Range("A2:A" & [A65000].End(xlUp).Row)
Set MonDico1 = CreateObject("Scripting.Dictionary")
For Each c In a: MonDico1.Add c, c: Next c
b = Range("B2:B" & [B65000].End(xlUp).Row)
Set MonDico2 = CreateObject("Scripting.Dictionary")
For Each c In b
If MonDico1.Exists(c) Then If Not MonDico2.Exists(c) Then MonDico2.Add c, c
Next c
[B2:B1000].ClearContents
[B2].Resize(MonDico2.Count, 1) = Application.Transpose(MonDico2.items)
End Sub
Sub test()
Dim Lig As Long, Trouve As Range, Plage As Range
Application.ScreenUpdating = False
For Lig = [B65536].End(xlUp).Row To 2 Step -1
Set Trouve = Columns("A").Find(Range("B" & Lig).Value, LookIn:=xlValues, lookat:=xlWhole)
If Trouve Is Nothing Then
If Plage Is Nothing Then
Set Plage = Range("B" & Lig)
Else: Set Plage = Union(Plage, Range("B" & Lig))
End If
End If
Next
Plage.Delete xlShiftUp
End Sub