Sorts the contents of a range or array based on the values in a corresponding range or array.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
SORTBY(array, by_array1, [sort_order1], ...)The SORTBY function allows you to sort data by one or more criteria without changing the original source data. It is a dynamic array function that returns a spill range, meaning it automatically updates when the source data changes.
=SORTBY(A2:B5, B2:B5, -1)ผลลัพธ์: Sorted list
Sorts the range A2:B5 based on values in B2:B5 in descending order.
No, SORTBY returns a new sorted array and leaves the original data unchanged.