J'ai un petit souci. En effet, je dois créer une macro qui me permettrait de
trier automatiquement mes données sur plusieurs listes réalisées en colonne.
Vous trouverez joint mon problème
2 B 5 E 1 A
3 C 2 B 4 D
5 E 1 A 5 E
1 A 3 C 3 C
4 D 4 D 2 B
Trier chaque liste par ordre alphabétique et alphanumérique en
ordre croissant pour chacune des colonnes
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect([A2:E50], Target) Is Nothing And Target.Count = 1 Then Range(Cells(2, Target.Column), Cells(50, Target.Column)).Sort key1:Îlls(2, Target.Column) End If End Sub
Cordialement JB
Bonjour
http://cjoint.com/?dCg7AiRQas
Tri les colonnes A,B,C,...dès la saisie:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect([A2:E50], Target) Is Nothing And Target.Count = 1
Then
Range(Cells(2, Target.Column), Cells(50, Target.Column)).Sort
key1:=Cells(2, Target.Column)
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect([A2:E50], Target) Is Nothing And Target.Count = 1 Then Range(Cells(2, Target.Column), Cells(50, Target.Column)).Sort key1:Îlls(2, Target.Column) End If End Sub