SORT evaluates the array argument and returns a sorted copy. The output spills into adjacent empty cells automatically -- do not enter anything in those cells or a #SPILL! error appears. The source data is never modified. Sort by a single column by passing its position as sort_index. Sort descending by setting sort_order to -1. Sort by multiple columns by passing arrays to both sort_index and sort_order: =SORT(A2:C100,{2,3},{1,-1}) sorts first by column 2 ascending then by column 3 descending. Wrap
FILTER around SORT or inside it to combine filtering and sorting in one formula -- the FILTER function returns an array that SORT handles directly. Wrap
UNIQUE inside SORT to get a sorted deduplicated list in one step. For older Excel versions where SORT does not exist, use the Data > Sort ribbon command or helper columns with RANK and INDEX MATCH.