#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel Sorting Order

Is there a way in Excel to set up a sort so that the sort is done by digit?

The following list of numbers
2024
2032
2008
2016
20008
2020
20020
20032
2012

when sorted ascending would typically appear sort like this
2008
2012
2016
2020
2024
2032
20008
20020
20032

The desired sort is this
20008
20020
20032
2008
2012
2016
2020
2024
2032


Help!!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Excel Sorting Order

hi
excel's sort is fixed (and by some opinions...limited) and thers's not much
you can do about it. special sorts outside of excel default usually requires
a helper column (and sometimes more than one). based on your example data
(and i'm not sure what you mean by "digit"), you want the "big" numbers
sorted above the "smaller" numbers.
???? correct???
or is there something else i'm not catching on to ?????
uh.....add a helper column and enter this formula into it....
=if(len(a2)4,0,1)
copy down.
assuming that your data is in column A, sort by helper column then column A.
adjust ranges above if needed.

if i missed something, please provilde more details.

regards
FSt1

"DoxieLvr" wrote:

Is there a way in Excel to set up a sort so that the sort is done by digit?

The following list of numbers
2024
2032
2008
2016
20008
2020
20020
20032
2012

when sorted ascending would typically appear sort like this
2008
2012
2016
2020
2024
2032
20008
20020
20032

The desired sort is this
20008
20020
20032
2008
2012
2016
2020
2024
2032


Help!!!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Excel Sorting Order

What you are asking for is a simple text sort, in ascending order. As long
as your cells are text, Excel will sort the way you want.

Options a
-- format the cells to text before you enter data
-- convert the cells to text using Paste Special...
-- Insert a helper column with the formula =text(a1,"0"), then sort on this.

Regards,
Fred

"DoxieLvr" wrote in message
...
Is there a way in Excel to set up a sort so that the sort is done by
digit?

The following list of numbers
2024
2032
2008
2016
20008
2020
20020
20032
2012

when sorted ascending would typically appear sort like this
2008
2012
2016
2020
2024
2032
20008
20020
20032

The desired sort is this
20008
20020
20032
2008
2012
2016
2020
2024
2032


Help!!!!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Excel Sorting Order

Data assumed to be in column A

In B1 enter =MID(A1,3,2)

Copy down.

Sort A and B on column B

Select "Sort anything that looks like a number as a number"


Gord Dibben MS Excel MVP

On Fri, 11 Dec 2009 15:55:01 -0800, DoxieLvr
wrote:

Is there a way in Excel to set up a sort so that the sort is done by digit?

The following list of numbers
2024
2032
2008
2016
20008
2020
20020
20032
2012

when sorted ascending would typically appear sort like this
2008
2012
2016
2020
2024
2032
20008
20020
20032

The desired sort is this
20008
20020
20032
2008
2012
2016
2020
2024
2032


Help!!!!


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
Changing the sorting order... Conrad C. Excel Worksheet Functions 4 April 18th 07 06:54 PM
Sorting by date order Jock W Excel Worksheet Functions 3 October 18th 06 01:01 PM
sorting data in order ceemo Excel Worksheet Functions 1 July 6th 05 12:13 PM
sorting in order ceemo Excel Worksheet Functions 2 June 30th 05 05:48 PM
sorting in order ceemo Excel Worksheet Functions 0 June 30th 05 01:20 PM


All times are GMT +1. The time now is 02:24 PM.

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"