Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Bubble Sort failure, Strcomp with binary compare

Hi Chip,
I don't know if you have the notify box checked on this board, but I've
sent you an email @ your site some possible bugs in the QSort I
downloaded from your site, and yes I have read your page regarding mails to
you.

There's another one on the way in about an hour. This reply is being
written at Thur Mar 18, 2010 2:20pm East coast time.

Best,
--
Neal Z


"Chip Pearson" wrote:


I have an implementation of QSort on my web site at
http://www.cpearson.com/Excel/QSort.htm . You can download the module
at http://www.cpearson.com/zips/modQSortInPlace.zip . It handles both
case sensitive and case insensitive sorts in either ascending or
descending order. QSort is much faster than a bubble sort. The code
can handle sorting both strings and numerics and it can handle sorting
only a subset of an array.

You would call QSortInPlace with code like

Sub AAA()
Dim Arr(1 To 5) As String
Dim N As Long
Arr(1) = "z"
Arr(2) = "A"
Arr(3) = "a"
Arr(4) = "Z"
Arr(5) = "m"
QSortInPlace InputArray:=Arr, CompareMode:=vbBinaryCompare
For N = 1 To 5
Debug.Print Arr(N)
Next N
End Sub

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Sun, 14 Mar 2010 17:44:01 -0700, Neal Zimm
wrote:

Cher Bernard,
Merci.
Lcase and Ucase do me no good.

The sort works fine with option compare text, but I wanted "more".

If you need a case sensitive sort, (and I forgot about the ascii
collating sequence) what's the best way without writing to a worksheet and
sorting there?

thanks much.
Neal

.

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
StrComp Rick Excel Programming 4 August 17th 07 11:48 PM
binary sort? Herbert Excel Programming 2 November 10th 05 07:55 AM
Sort data failure Robert Pollock[_2_] Excel Programming 1 February 16th 04 01:27 PM
Calling Bubble Sort Function [email protected] Excel Programming 6 December 26th 03 07:27 PM


All times are GMT +1. The time now is 06:52 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"