The two codes are simply modified to give a time measurement thus:
Range.Sort Method:
Array Sort coding ( In recursion code): ( Sub SimpleArraySort6( )Code:Dim StartTime As Double: Let StartTime = Timer rngToSort.Sort Key1:=wksToSort.Columns("H"), order1:=xlDescending, Key2:=wksToSort.Columns("J"), order2:=xlDescending, Key3:=wksToSort.Columns("X"), order3:=xlDescending 'X Nat MsgBox prompt:=Round(Timer - StartTime, 2)
Part of original data test rangeCode:'3c) Dim StartTime As Double: Let StartTime = Timer arrTS() = rngToSort.Value: Call SimpleArraySort6(1, arrTS(), strIndcs, " 8 Desc 10 Desc 24 Desc "): rngToSort.Value = arrTS() MsgBox prompt:=Round(Timer - StartTime, 2)
_____ Workbook: ProAktuellex8600x2SortTime.xlsm ( Using Excel 2007 32 bit )
Worksheet: Sheet1
Row\Col H I J K W X Y 824 338 0.1 0 825 826 351 0.1 827 342 0.1 0 828 342 0 829 341 0.1 0 830 338 1 0 831 338 0.1 0 832 338 0.1 0.1 833 337 0.5 0.1 834 337 0.1 0 835 337 0 0.1 836 336 0.2 0 837 335 0.1 0 838 334 0 0.1 839 333 0.2 0 840 332 0.2 0 841 332 0.1 0.1 842 332 0.1 0 843 331 0.1 0.1 844 331 0.1 0.1 845 329 0.2 0 846 329 0.1 0 847 326 0.3 0 848 326 0.3 0 849 326 0.2 0 850 326 0.1 0 851 324 0.1 0.1 852 324 0.1 0 853 319 0.2 0.1 854 318 0.5 0.1 855 316 0.2 0.1 856 279 0.5 0.1 857 232 0.1 0 858 230 0.2 0 859 215 0 0 860 861 338 0.1 0.1 862 339 0.1 0 863 337 0.1 0.1 864 865 338 1 0
"ProAktuellex8600x2SortTime.xlsm" https://app.box.com/s/af7891hzmd3sbfnnsmx5b28ktec6wwjo




Reply With Quote
Bookmarks