Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort MultiDimensional Array

I would like to sort a 5926x12 array. I would like it first sorted by
Column 9-(integer value)-Date
then Column 2 (integer value)-Trailor #
then Column 11 (integer value)-Destination

I want to do this in VBA since that is where the array is. To copy it
to a worksheet, sort, and then reread the array would be time consuming
when the program is ran. I would like the end product to be as if I
had used the "Data", "Sort" command in excel with the Then bys filled
in. Any help would be greatly appreciated. I have searched for this
and have not found a conclusive answer. Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Sort MultiDimensional Array

Take your pick of these:
http://www.devx.com/vb2themax/Article/19900

However, given that you can do the same in a couple of lines of code AND a
worksheet, I'd take this option.
Turn off Calculation, .updating etc., and it won't take long. Excel's
algorithm for this type of thing are highly optimised and I'm sure faster
than code you could write in VBA.

NickHK

"Mushi" wrote in message
oups.com...
I would like to sort a 5926x12 array. I would like it first sorted by
Column 9-(integer value)-Date
then Column 2 (integer value)-Trailor #
then Column 11 (integer value)-Destination

I want to do this in VBA since that is where the array is. To copy it
to a worksheet, sort, and then reread the array would be time consuming
when the program is ran. I would like the end product to be as if I
had used the "Data", "Sort" command in excel with the Then bys filled
in. Any help would be greatly appreciated. I have searched for this
and have not found a conclusive answer. Thanks.



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
application.match and multidimensional array? KR Excel Programming 2 March 13th 06 05:20 PM
Referencing multidimensional array Jay Petrulis[_2_] Excel Programming 2 May 27th 05 02:23 AM
Multidimensional Array DavidMoeller Excel Programming 4 August 12th 04 08:12 PM
MAX of Multidimensional Array ZZZ Excel Programming 2 November 15th 03 03:32 PM
size of multidimensional dynamic array ThatFella[_2_] Excel Programming 4 September 3rd 03 11:53 PM


All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"