Bonjour le forum,
Je cherche comment je peux trier une place de données variable. La cellule de départ n'étant pas toujours la même j'ai essayé ceci :
ActiveWorkbook.Worksheets("Cédule").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Cédule").Sort.SortFields.Add Key:=Range(ActiveCell, ActiveCell.Offset(0, 2).End(xlDown)).Select, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Cédule").Sort
.SetRange Range(ActiveCell, ActiveCell.Offset(0, 2).End(xlDown)).Select
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
sans succès.
Comment pourrais-je corriger la situation ?
Merci
Je cherche comment je peux trier une place de données variable. La cellule de départ n'étant pas toujours la même j'ai essayé ceci :
ActiveWorkbook.Worksheets("Cédule").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Cédule").Sort.SortFields.Add Key:=Range(ActiveCell, ActiveCell.Offset(0, 2).End(xlDown)).Select, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Cédule").Sort
.SetRange Range(ActiveCell, ActiveCell.Offset(0, 2).End(xlDown)).Select
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
sans succès.
Comment pourrais-je corriger la situation ?
Merci
Dernière édition: