ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Collation inconsistencies (https://www.excelbanter.com/excel-programming/371982-collation-inconsistencies.html)

Patricia Shannon

Collation inconsistencies
 
In a macro, .Sort should give results consistent with comparison operators;
in fact, that should be the default sort order.
I finally sorted the data myself, with a bubble sort. Since it sorted based
on comparison operators, I got what I wanted, but I wasted a lot of time
trying, and failing, to use built-in methods.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/communities...el.programming

Peter T

Collation inconsistencies
 
Whilst there are some inconsistencies in Excel's sort vs comparison
operators overall both systems work logically, ie likely to be of most use
to most people most of the time.

However there are also differences in comparison methods in Excel & VB/A.
IOW a VB/A bubble sort will not compare in the same way as Excel's
comparison operators with a variety of data types. Option Compare Text helps
but not entirely.

Regards,
Peter T


"Patricia Shannon" wrote in
message ...
In a macro, .Sort should give results consistent with comparison

operators;
in fact, that should be the default sort order.
I finally sorted the data myself, with a bubble sort. Since it sorted

based
on comparison operators, I got what I wanted, but I wasted a lot of time
trying, and failing, to use built-in methods.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow

this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.


http://www.microsoft.com/communities...ault.aspx?mid=
39e5b01e-037c-4476-ac8c-536c9927d196&dg=microsoft.public.excel.programming



Patricia Shannon

Collation inconsistencies
 
Yes, I did have to format the areas I was working with as Text in order to
for my program to work right.

"Peter T" wrote:

Whilst there are some inconsistencies in Excel's sort vs comparison
operators overall both systems work logically, ie likely to be of most use
to most people most of the time.

However there are also differences in comparison methods in Excel & VB/A.
IOW a VB/A bubble sort will not compare in the same way as Excel's
comparison operators with a variety of data types. Option Compare Text helps
but not entirely.

Regards,
Peter T


"Patricia Shannon" wrote in
message ...
In a macro, .Sort should give results consistent with comparison

operators;
in fact, that should be the default sort order.
I finally sorted the data myself, with a bubble sort. Since it sorted

based
on comparison operators, I got what I wanted, but I wasted a lot of time
trying, and failing, to use built-in methods.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow

this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.


http://www.microsoft.com/communities...ault.aspx?mid=
39e5b01e-037c-4476-ac8c-536c9927d196&dg=microsoft.public.excel.programming





All times are GMT +1. The time now is 02:00 AM.

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