Option Explicit
Sub SuppDoublonMP()
Const pas = 16384
Dim shact As Worksheet, xrg As Range
Dim lig&, col&, i&, j&, k&, deb&, fin&, t0 As Single
Dim dico As New Dictionary, T
t0 = Timer
Application.ScreenUpdating = False
Set shact = ActiveSheet
Set xrg = shact.Range("A1").CurrentRegion
lig = xrg.Rows.Count: col = xrg.Columns.Count
deb = 1
With shact
Do
fin = IIf(deb + pas > lig, lig, deb + pas - 1)
T = .Range(.Cells(deb, 1), .Cells(fin, col)).Value
For i = 1 To fin + 1 - deb
dico.RemoveAll
k = 0
For j = 1 To col
If T(i, j) <> "" Then
If Not dico.Exists(T(i, j)) Then
k = k + 1
T(i, k) = T(i, j)
dico.Add T(i, j), ""
End If
End If
Next j
For j = k + 1 To col
T(i, j) = ""
Next j
Next i
.Range(.Cells(deb, 1), .Cells(fin, col)).Clear
.Range(.Cells(deb, 1), Cells(fin, col)).Value = T
deb = fin + 1
Loop Until deb > lig
End With
Application.Goto shact.Range("A1"), True
Application.ScreenUpdating = True
MsgBox "Durée: " & Format(Timer - t0, "0.0 sec")
End Sub