View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Fast string comparison (and sort)

Hi Robert,

Am Tue, 19 May 2015 01:49:50 -0700 schrieb Robert Crandal:

Actually, I am experimenting with an "insert sort". I want to insert
words, one at a time, into column A of my spreadsheet.
If I need to insert a word between two words, I am using the
Selection.Insert command to make a new row for the new word.

Do you have any suggestions on how to achieve this sort in
ascending order? For now I'm trying to perform an "insert sort",
and column A will store all words after the sort is complete.


there are two fast ways.
One way is the bubblesort from my last reply. You sort into the array
and write the array to column A. The code you can insert into the
compare code.
The second way is to write the array first to column A and then sort
column A ascending.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional