ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sorting a large selection (https://www.excelbanter.com/excel-programming/334170-sorting-large-selection.html)

narutard

sorting a large selection
 

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

--
narutar
-----------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...fo&userid=2511
View this thread: http://www.excelforum.com/showthread.php?threadid=38616


Tom Ogilvy

sorting a large selection
 
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.

--
Regards,
Tom Ogilvy

"narutard" wrote in
message ...

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

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

the range of the selection would be the whole column (i.e. i would
click the A if i wanted to sort the A column, but the script should
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 help


--
narutard
------------------------------------------------------------------------
narutard's Profile:

http://www.excelforum.com/member.php...o&userid=25111
View this thread: http://www.excelforum.com/showthread...hreadid=386163





All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com