Sorts the contents of a range or array.
תחביר
SORT(array, [sort_index], [sort_order], [by_col])ארגומנטים
arrayחובה
The range or array to sort.
sort_indexאופציונלי
The number indicating the row or column to sort by.
sort_orderאופציונלי
1 for ascending (default), -1 for descending.
by_colאופציונלי
TRUE to sort by column, FALSE to sort by row (default).
The SORT function returns a sorted version of an array or range. It allows you to specify the column or row index to sort by, the sort order (ascending or descending), and whether to sort by row or by column.
=SORT(A2:B5, 2, -1)→Sorted arraySorts the range A2:B5 based on the second column in descending order.
Select the target cell
Click on the cell where you want the sorted results to appear.
Enter the formula
Type =SORT( followed by the range and your sorting criteria, then press Enter.
No, SORT returns a dynamic array and does not change the source data.