Sub Trie_Tableau()
'Trie décroissant
Dim DLt As Long ' La dernière ligne du tableau
DLt = Feuil13.Range("A" & Rows.Count).End(xlUp).Row
Feuil13.Sort.SortFields.Clear
Feuil13.Sort.SortFields.Add2 Key:=Range("B2:B" & DLt) _
, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
Feuil13.Sort.SortFields.Add2 Key:=Range("A2:A" & DLt) _
, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With Feuil13.Sort
.SetRange Range("A1:G" & DLt) ' Le tableau
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.Apply
End With
Range("A1").Select
End Sub
Partager