sorting a large selection

  • Thread starter Thread starter narutard
  • Start date Start date
N

narutard

hello, this is my first time posting so excuse me if i do anythig
wrong

i would like some help on a script for sorting a large selection o
numerical data in ascending order

the range of the selection would be the whole column (i.e. i woul
click the A if i wanted to sort the A column, but the script shoul
also work for sorting out other columns)

for example

i have data that is

10/12312/123312/231/1232
24/12312/123312/231/1230
46/12312/123312/231/1233
57/12312/123312/231/1235
99/12312/123312/231/1234
13210/12312/123312/231/121223

appreciate the hel
 
Selection.Sort Key1:=selection(1), Order:=xlAscending

Excel will allow you to specify 3 key columns at a time. If you need more,
then you need to work for the lowest level of significance up to the highest
level of significance in groups of 3.

You can get most of this by Turning on the macro recorder and doing it
manually once. then generalize the code.
 
Back
Top