Arrayhard
SORTN()
Returns the first n items of a sorted range, for top-N or bottom-N selection.
Syntax
fx
=SORTN(range, [n], [display_ties_mode], [sort_column], [is_ascending])
Arguments
Example
fx
=SORTN(A2:B100, 5, 0, 2, FALSE)
Paste this into Google Sheets to run it. The live playground on this site covers 24 of the 61 functions, and SORTN isn't one of them yet.
Related formulas
Used by