Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a way to Auto sort or save a sort? | Excel Discussion (Misc queries) | |||
save sort order ? | Excel Discussion (Misc queries) | |||
how do i save the sort settings | Setting up and Configuration of Excel | |||
Auto sort & save | Excel Worksheet Functions | |||
Sort By Date and Save | Excel Programming |