ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Binary sorting? (https://www.excelbanter.com/excel-programming/345145-binary-sorting.html)

Roderick[_7_]

Binary sorting?
 

Hello!

In VBA I can set an option compare to binary in order to compare
strings
case sensitive. With that option set, "a" and "A" are treated as
different
values ("A" < "a")
But if I use the sort method with MatchCase:=True the sort order is "a"
<
"A" !

What I need is compare mode and sort mode to behave according to the
same
order of characters/strings.

Is there a way around this? Can I sort binary? Or am I missing
something else?

Any help is appreciated

Herbert Becker


--
Roderick
------------------------------------------------------------------------
Roderick's Profile: http://www.excelforum.com/member.php...o&userid=13981
View this thread: http://www.excelforum.com/showthread...hreadid=483489


Tom Ogilvy

Binary sorting?
 
Not with the built in sort function. You would have to write your own.

--
Regards,
Tom Ogilvy


"Roderick" wrote in
message ...

Hello!

In VBA I can set an option compare to binary in order to compare
strings
case sensitive. With that option set, "a" and "A" are treated as
different
values ("A" < "a")
But if I use the sort method with MatchCase:=True the sort order is "a"
<
"A" !

What I need is compare mode and sort mode to behave according to the
same
order of characters/strings.

Is there a way around this? Can I sort binary? Or am I missing
something else?

Any help is appreciated

Herbert Becker


--
Roderick
------------------------------------------------------------------------
Roderick's Profile:

http://www.excelforum.com/member.php...o&userid=13981
View this thread: http://www.excelforum.com/showthread...hreadid=483489





All times are GMT +1. The time now is 11:53 AM.

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