Bonjour,
Une autre proposition.
Cdlt.
Public Sub SortData()
Dim ws As Worksheet, lastCol As Long, lastRow As Long, rngData As Range, rngHeaders As Range
For Each ws In ActiveWorkbook.Worksheets
With ws
lastCol = .Cells(1, .Columns.Count).End(xlToLeft).Column
lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
Set rngData = .Cells(1).Offset(, 1).Resize(lastRow, lastCol - 1)
Set rngHeaders = .Cells(1).Offset(, 1).Resize(1, lastCol - 1)
With .Sort
.SortFields.Clear
.SortFields.Add Key:=rngHeaders, SortOn:=xlSortOnValues, Order:=xlDescending
.SetRange rngData
.Header = xlYes
.Orientation = xlLeftToRight
.Apply
End With
End With
Next ws
End Sub