Private Sub CommandButton1_Click()
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [A1].CurrentRegion
If CommandButton1.Caption = "RAZ" Then
CommandButton1.Caption = "Classer"
.Columns(5).EntireColumn = ""
.Sort .Cells(1), xlAscending, Header:=xlYes 'tri alphabétique
Else
CommandButton1.Caption = "RAZ"
If .Rows.Count = 1 Then Exit Sub 'si le tableau est vide
.Sort .Columns(2), xlDescending, .Columns(3), , xlAscending, Header:=xlYes 'tri numérique
.Cells(2, 5) = 1: .Cells(2, 5).Resize(.Rows.Count - 1).DataSeries
.Columns(5).EntireColumn.NumberFormat = "0""EME"""
.Cells(2, 5).NumberFormat = "0""ER"""
End If
End With
End Sub