Bonjour,
Une autre proposition à étudier.
Les données sont sous forme de tableau (structuré).
Cdlt.
Public Sub SortAndRemoveDuplicates()
Dim lo As ListObject
If ActiveCell.ListObject Is Nothing Then Exit Sub
If MsgBox("Le tableau va être trié et les doublons supprimés.", _
vbOKCancel + vbQuestion, "Procédure") = vbCancel Then Exit Sub
Set lo = ActiveCell.ListObject
With lo
If .DataBodyRange Is Nothing Then Exit Sub
.Sort.SortFields.Add .ListColumns(1).DataBodyRange, xlSortOnValues, xlAscending
.Sort.Apply
.Sort.SortFields.Clear
.Range.RemoveDuplicates 1
End With
End Sub