#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Excel Sort

Hi Everyone:

I was wondering if any of the excel experts and MVP's know what algorithm
excel is using for their sorting command (Data - Sort). I am trying to do
something similar to Excel's sort that sorts column 1, then 2, then 3. All
the algorithms that I have seen, only sort one column.

Thanks for all your help.

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Excel Sort

AFAIK,
Excel sorts one column at a time from last to first. For example, if you
select Col.s A first, then B second then C third, Excel sorts C then B then A.
--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Bob" wrote:

Hi Everyone:

I was wondering if any of the excel experts and MVP's know what algorithm
excel is using for their sorting command (Data - Sort). I am trying to do
something similar to Excel's sort that sorts column 1, then 2, then 3. All
the algorithms that I have seen, only sort one column.

Thanks for all your help.

Bob



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Excel Sort

Don't know exactly what you want, but here is a site reference, and some of
the info that is on the site.

http://office.microsoft.com/en-us/sh...ort %20orders


Numbers Numbers are sorted from the smallest negative number to the
largest positive number.
Dates Dates are sorted from the earliest date to the latest date.
Text Alphanumeric text is sorted left to right, character by character.
For example, if a cell contains the text "A100," Excel Services places the
cell after a cell that contains the entry "A1" and before a cell that
contains the entry "A11."
Text and text that includes numbers stored as text are sorted in the
following order:

0 1 2 3 4 5 6 7 8 9 (space) ! " # $ % & ( ) * , . / : ; ? @ [ \ ] ^ _ ` { |
} ~ + < = A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Apostrophes (') and hyphens (-) are ignored, with one exception: If two text
strings are the same except for a hyphen, the text with the hyphen is sorted
last.
Note If you have changed the default sort order to be case-sensitive
through the Sort Options dialog box in Microsoft Office Excel 2007, then the
order for alphabetic characters is the following: a A b B c C d D e E f F g G
h H i I j J k K l L m M n N o O p P q Q r R s S t T u U v V w W x X y Y z Z

Logical In logical values, FALSE is placed before TRUE.
Error All error values, such as #NUM! and #REF!, are equal.
Blank cells In both an ascending and descending sort, blank cells are
always placed last.
Note A blank cell is an empty cell and is different from a cell with one
or more space characters.


Note Sort orders vary by locale setting. Excel Services sorts by the
locale setting of the server, which may be different from your computer
locale setting. For more information, see your administrator or Microsoft
Office SharePoint Server Central Administration Help.



"Bob" wrote:

Hi Everyone:

I was wondering if any of the excel experts and MVP's know what algorithm
excel is using for their sorting command (Data - Sort). I am trying to do
something similar to Excel's sort that sorts column 1, then 2, then 3. All
the algorithms that I have seen, only sort one column.

Thanks for all your help.

Bob



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Excel Sort

Why not just use the builtin sort? I presume you are doing in VBA, so just
code an Excel VBA sort.

--
__________________________________
HTH

Bob

"Bob" wrote in message
...
Hi Everyone:

I was wondering if any of the excel experts and MVP's know what algorithm
excel is using for their sorting command (Data - Sort). I am trying to
do something similar to Excel's sort that sorts column 1, then 2, then 3.
All the algorithms that I have seen, only sort one column.

Thanks for all your help.

Bob



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
Updating workbook with an alpha sort sheet and a numeric sort shee cjlatta Excel Discussion (Misc queries) 2 January 28th 09 12:00 AM
Sort from SQL view does not sort in EXCEL Pat M - City of Reno Excel Discussion (Misc queries) 0 August 31st 07 07:38 PM
Pls. reply Sort Data and copy to next coulmn when sort order chang shital shah Excel Programming 1 August 19th 05 02:51 PM
Excel sort by Fill Color by custom list sort Dash4Cash Excel Discussion (Misc queries) 2 July 29th 05 10:45 PM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


All times are GMT +1. The time now is 04:01 PM.

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

About Us

"It's about Microsoft Excel"