Bonjour,
Est-il possible de trier deux plages en même temps?
Je recherche a modifier mon code c'est à dire j'aimerais trier les colonnes "A2:F101 et K2:K101" avec ce code mais j'ai un message d'erreur "Argument ou Appel de procédure incorrect "
J'avoue, ne pas savoir comment faire ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 Private Sub CommandButton2_Click() 'trie et Classement Range("A2:F101,K2:K101").Select Application.CutCopyMode = False ActiveWorkbook.Worksheets("Score").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Score").Sort.SortFields.Add Key:=Range("A2"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("Score").Sort .SetRange Range("A2:F101,K2:K101") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With 'sélectionne une autre cellule Range("M14").Select End Sub
Je vous remercie de votre aide.
Cordialement
Max
Partager