Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rowf
 
Posts: n/a
Default Sorting List of Numbers

I am trying to sort account numbers that look something like this (but in a
column, not a row):

18,19,20,30,100,102,105,110,111


To look like this

100,101,102,105,110,111,18,19,20,30

Basically based on the first digit, then second digit, etc instead of
numerically.
Any ideas would be greatly appreciated!
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Maybe you could use a helper column, some formulas and sort by that helper
column.

Say your data is A1:Axx
Insert a new column B and use this formula:

=A1&""
and drag down.

Now sort your range by this helper column.

But I'm not sure how you got 101 in that output!!

Rowf wrote:

I am trying to sort account numbers that look something like this (but in a
column, not a row):

18,19,20,30,100,102,105,110,111

To look like this

100,101,102,105,110,111,18,19,20,30

Basically based on the first digit, then second digit, etc instead of
numerically.
Any ideas would be greatly appreciated!


--

Dave Peterson
  #3   Report Post  
swatsp0p
 
Posts: n/a
Default

here's one way: insert a helper column next to your column of acct. numbers.

Assuming your data begins in J1, in K1 place this formula:

=IF(J1<100,J1*10,J1) and copy down your range. (now all cells will be a 3
digit number)

Next, highlight the entire range and SortAscending by column K

Finally, delete column K

Your original values are now sorted in your desired order.

HTH
__________________
Bruce

  #4   Report Post  
swatsp0p
 
Posts: n/a
Default

here's one way: insert a helper column next to your column of acct. numbers.

Assuming your data begins in J1, in K1 place this formula:

=IF(J1<100,J1*10,J1) and copy down your range. (now all cells will be a 3
digit number)

Next, highlight the entire range and SortAscending by column K

Finally, delete column K

Your original values are now sorted in your desired order.

HTH
__________________
Bruce

  #5   Report Post  
swatsp0p
 
Posts: n/a
Default

here's one way: insert a helper column next to your column of acct. numbers.

Assuming your data begins in J1, in K1 place this formula:

=IF(J1<100,J1*10,J1) and copy down your range. (now all cells will be a 3
digit number)

Next, highlight the entire range and SortAscending by column K

Finally, delete column K

Your original values are now sorted in your desired order.

HTH
__________________
Bruce


"Dave Peterson" wrote:

Maybe you could use a helper column, some formulas and sort by that helper
column.

Say your data is A1:Axx
Insert a new column B and use this formula:

=A1&""
and drag down.

Now sort your range by this helper column.

But I'm not sure how you got 101 in that output!!

Rowf wrote:

I am trying to sort account numbers that look something like this (but in a
column, not a row):

18,19,20,30,100,102,105,110,111

To look like this

100,101,102,105,110,111,18,19,20,30

Basically based on the first digit, then second digit, etc instead of
numerically.
Any ideas would be greatly appreciated!


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I wish to change the last digit in a list of random numbers. To a. kingie Excel Worksheet Functions 5 February 28th 05 08:17 PM
Alphabetical list of Numbers are not correct! scott Excel Discussion (Misc queries) 3 February 2nd 05 04:39 PM
Extracting Values on one list and not another B Schwarz Excel Discussion (Misc queries) 4 January 7th 05 01:48 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM
Sorting imported "numbers" Confused on the tundra Excel Discussion (Misc queries) 5 December 17th 04 07:33 PM


All times are GMT +1. The time now is 06:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"