1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Sub Communs()
t = Timer()
Set MonDico1 = CreateObject("Scripting.Dictionary")
For Each c In Range([A1], [A65000].End(xlUp))
If Not MonDico1.Exists(c.Value) Then MonDico1.Add c.Value, c.Value
Next c
Set mondico2 = CreateObject("Scripting.Dictionary")
For Each c In Range([B1], [B65000].End(xlUp))
If MonDico1.Exists(c.Value) Then mondico2.Add c.Value, c.Value
Next c
i = 1
Range("H1:H" & mondico2.Count) = Application.Transpose(mondico2.items)
MsgBox Timer() - t
End Sub
Sub NonDoublons1()
Set MonDico1 = CreateObject("Scripting.Dictionary")
For Each c In Range([A1], [A65000].End(xlUp))
If Not MonDico1.Exists(c.Value) Then MonDico1.Add c.Value, c.Value
Next c
Set mondico2 = CreateObject("Scripting.Dictionary")
For Each c In Range([B1], [B65000].End(xlUp))
If Not MonDico1.Exists(c.Value) Then
mondico2.Add c.Value, c.Value
End If
Next c
i = 1
For Each c In mondico2
Cells(i, "M") = c
i = i + 1
Next c
End Sub
Sub NonDoublons2()
Set MonDico1 = CreateObject("Scripting.Dictionary")
For Each c In Range([B1], [B65000].End(xlUp))
If Not MonDico1.Exists(c.Value) Then MonDico1.Add c.Value, c.Value
Next c
Set mondico2 = CreateObject("Scripting.Dictionary")
For Each c In Range([A1], [A65000].End(xlUp))
If Not MonDico1.Exists(c.Value) Then
mondico2.Add c.Value, c.Value
End If
Next c
i = 1
For Each c In mondico2
Cells(i, "P") = c
i = i + 1
Next c
End Sub |
Partager