Merci beaucoup !
Mon but était de justement séparer ses opérations (excuse moi pour la "non précision" de ce fait)
Ducoup j'ai essayé d'adapter en fesant d'une part ceci (dans une macro) :
Tri des lignes :
With ActiveSheet
pl = .Cells(1, 2).End(xlDown).Row ' première ligne du tableau
dl = .Cells(Rows.Count, 2).End(xlUp).Row 'dernière ligne du tableau
dc = .Cells(dl, Columns.Count).End(xlToLeft).Column ' dernière colonne du tableau
'tri des colonnes sur ligne dl
.Sort.SortFields.Clear
.Sort.SortFields.Add Key:=.Range(.Cells(dl, 2), .Cells(dl, dc)), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
.Sort.SetRange .Range(.Cells(pl, 2), .Cells(dl, dc))
.Sort.Header = xlNo
.Sort.MatchCase = False
.Sort.Orientation = xlLeftToRight
.Sort.SortMethod = xlPinYin
.Sort.Apply
End With
Et de l'autre (tri des lignes):
With ActiveSheet
pl = .Cells(1, 2).End(xlDown).Row + 1 ' première ligne du tableau
dl = .Cells(Rows.Count, 2).End(xlUp).Row - 1 'dernière ligne du tableau
dc = .Cells(dl, Columns.Count).End(xlToLeft).Column + 1
.Sort.SortFields.Clear
.Sort.SortFields.Add Key:=.Range(.Cells(pl, dc), .Cells(dl, dc)), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
.Sort.SetRange .Range(.Cells(pl, 1), .Cells(dl, dc))
.Sort.Header = xlNo
.Sort.MatchCase = False
.Sort.Orientation = xlTopToBottom
.Sort.SortMethod = xlPinYin
.Sort.Apply
End With
Mais cela rend exactement comme mon problème du début (il ne tri pas en ligne). Pourtant, ce sont les même codes que vous