LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Save & Sort

Hello,

I have a very big excel file (approx. 58 MB) and every time I open my
worksheet I run a module which go thru each row (in 4 different columns ex.
| Ticker | Name | Category | Country ) and save the data in a dictionary and
once finished (which means approx after 8000 rows) I sort the result using
the following function :

Public Function SortArray(MyArray As Variant) As Variant
'Sort array
For lLoop = 0 To UBound(MyArray)
For lLoop2 = lLoop To UBound(MyArray)
If UCase(MyArray(lLoop2)) < UCase(MyArray(lLoop)) Then
str1 = MyArray(lLoop)
str2 = MyArray(lLoop2)
MyArray(lLoop) = str2
MyArray(lLoop2) = str1
End If
Next lLoop2
Next lLoop

'Output sorted array
SortArray = MyArray

End Function

My question is : Is there a way to save the result faster and also sort it
faster than the one I use at the moment ?

Thanks in advance.

Cheers!

 
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
Is there a way to Auto sort or save a sort? Barbie Excel Discussion (Misc queries) 11 December 1st 09 09:48 PM
save sort order ? rolando Excel Discussion (Misc queries) 1 March 10th 09 01:19 PM
how do i save the sort settings lark4dr Setting up and Configuration of Excel 0 June 8th 07 10:47 PM
Auto sort & save Pebbbles Excel Worksheet Functions 0 February 14th 06 03:26 AM
Sort By Date and Save James Stephens Excel Programming 0 January 13th 04 04:41 PM


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