C'est parfaitement ça. Merci t'es un monstreRe-,
Allez, vite fait
VB:Sub Tri_H() Dim Plg As Range Dim DerCol As Long, DerLig As Long With Worksheets("Feuil1") DerCol = .Cells(5, Columns.Count).End(xlToLeft).Column DerLig = .Cells.SpecialCells(xlCellTypeLastCell).Row Set Plg = .Range("L1").Resize(DerLig, DerCol - 11) .Sort.SortFields.Clear .Sort.SortFields.Add(Plg.Rows(5), _ xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = .Range("L5").Interior.Color .Sort.SetRange Plg .Sort.Header = xlYes .Sort.Orientation = xlLeftToRight .Sort.Apply End With End Sub
Sub Tri_H()
Dim Plg As Range
Dim DerCol As Long, DerLig As Long
With Worksheets("Feuil1")
DerCol = .Cells(5, Columns.Count).End(xlToLeft).Column
DerLig = .Cells.SpecialCells(xlCellTypeLastCell).Row
Set Plg = .Range("L1").Resize(DerLig, DerCol - 11)
.Sort.SortFields.Clear
.Sort.SortFields.Add(Plg.Rows(5), _
xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = .Range("L5").Interior.Color
.Sort.SetRange Plg
.Sort.Header = xlYes
.Sort.Orientation = xlLeftToRight
.Sort.Apply
End With
End Sub
C'est parfaitement ça. Merci t'es un monstreRe-,
Allez, vite fait
VB:Sub Tri_H() Dim Plg As Range Dim DerCol As Long, DerLig As Long With Worksheets("Feuil1") DerCol = .Cells(5, Columns.Count).End(xlToLeft).Column DerLig = .Cells.SpecialCells(xlCellTypeLastCell).Row Set Plg = .Range("L1").Resize(DerLig, DerCol - 11) .Sort.SortFields.Clear .Sort.SortFields.Add(Plg.Rows(5), _ xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = .Range("L5").Interior.Color .Sort.SetRange Plg .Sort.Header = xlYes .Sort.Orientation = xlLeftToRight .Sort.Apply End With End Sub