Sub Tri_croissant()
Dim ncol%, i&, a&(), n&
Application.ScreenUpdating = False
With [Base].ListObject.Range
If .Parent.FilterMode Then .Parent.ShowAllData 'si la feuille est filtrée
ncol = .Columns.Count
For i = 2 To .Rows.Count
If .Cells(i, 1).Interior.ColorIndex = 6 Then 'couleur jaune
ReDim Preserve a(n) 'base 0
a(n) = i 'mémorise la ligne
.Rows(i).Cut .Cells(i, ncol + 2)
n = n + 1
End If
Next
'---restitution---
If n = 0 Then Exit Sub
.Sort .Columns(1), xlAscending, Header:=xlYes 'tri croissant
For i = 0 To UBound(a)
.Rows(a(i)).Insert xlDown
.Cells(a(i), ncol + 2).Resize(, ncol).Cut .Rows(a(i))
Next
.Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete 'supprime les lignes vides
.Parent.Activate
End With
End Sub