Sub Macro1()
Application.ScreenUpdating = False [COLOR=darkgreen]'bloque l'affichage écran[/COLOR]
[COLOR=darkgreen]'qui sera remis à la fin[/COLOR]
Dim derlig As Long
Sheets("Feuil2").Columns("A:E").ClearContents [COLOR=darkgreen]'efface le contenu Feuil2[/COLOR]
With Sheets("Feuil1") [COLOR=darkgreen]'Travaille sur l'onglet Feuil1[/COLOR]
derlig = .Cells(Rows.Count, 1).End(xlUp).Row [COLOR=darkgreen]'calcuile la dernière ligne Feuil2[/COLOR]
Set Plage = .Range("A1:E" & derlig) [COLOR=darkgreen]'Définit la plage à copier[/COLOR]
Plage.Copy Sheets("Feuil2").Range("A1") [COLOR=darkgreen]' et la copie Feuil2[/COLOR]
End With
With Sheets("Feuil2") [COLOR=darkgreen]'Travaille sur l'onglet Feuil2[/COLOR]
.Sort.SortFields.Clear [COLOR=darkgreen]'trie les données par ordre décroissant colonne C[/COLOR]
.Sort.SortFields.Add Key:=Range("C2:C" & derlig), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With .Sort
.SetRange Range("A1:E" & derlig)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With [COLOR=darkgreen]'fin du tri[/COLOR]
.Range("$A$1:$E$" & derlig).RemoveDuplicates Columns:=4, Header:=xlYes 'Elimine les doublons Noms
End With
Application.ScreenUpdating = False
End Sub