Like This... #include <array.au3> $Array = StringSplit("2,5,3,4,6,1,8,9,7", ",") _ArraySortNum($Array) _ArrayDisplay($Array, "Sorted Array") Func _ArraySortNum(ByRef $n_array, $i_descending = 0, $i_start = 1) Local $i_ub = UBound($n_array) For $i_count = $i_start To $i_ub - 2 Local $i_se = $i_count If $i_descending Then For $x_count = $i_count To $i_ub - 1 If Number($n_array[$i_se]) < Number($n_array[$x_count]) Then $i_se = $x_count Next Else For $x_coun