ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Sort (https://www.excelbanter.com/excel-programming/416712-excel-sort.html)

Bob[_77_]

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



Gary Brown[_4_]

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




JLGWhiz

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




Bob Phillips[_3_]

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





All times are GMT +1. The time now is 12:28 PM.

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