[VBA/Excel] Ascending Sort in a Column
sfritz
Posted messages
49
Status
Membre
-
pilas31 Posted messages 1878 Status Contributeur -
pilas31 Posted messages 1878 Status Contributeur -
Hello,
I would like to sort numbers in ascending order in a column.
I would like to know if there is a sort function (or something equivalent), or if I have to create code to sort these values.
If there is a function, please specify which one, along with a small example if possible.
Thank you.
I would like to sort numbers in ascending order in a column.
I would like to know if there is a sort function (or something equivalent), or if I have to create code to sort these values.
If there is a function, please specify which one, along with a small example if possible.
Thank you.
For example from A to H
Columns("A:H").Select
Selection.Sort Key1:=Range("A1")
Best regards
Columns("A:H").Sort Key1:=Range("A1") is so much nicer to read...
EDIT: you can even do without the second range by replacing it with a cells, at least... But oh well ^^
I completely agree.
We need to track the Select statements to optimize the code.
In my initial post 7 and a half years ago, I was probably not yet aware enough of this aspect.
Best regards,