Code: Select all
list =
(
500
5
4-Series
360
3
2-Series
260
2
1-Series
190
124 Spider
)
Sort, list, F StringSort ;Sort function
;Sort Function Output: How Excel sorts the same list:
; 1-Series 124 Spider
; 124 Spider 190
; 2 1-Series
; 190 2
; 2-Series 260
; 3 2-Series
; 260 3
; 360 360
; 4-Series 4-Series
; 5 5
; 500 500
;Sort function I used found in AHK documentation
StringSort(a1, a2)
{
return a1 > a2 ? 1 : a1 < a2 ? -1 : 0 ; Sorts alphabetically based on the setting of StringCaseSense.
}
Any ideas on how to solve this? Perhaps someone has a sort function that already does this? Thanks!