deepcalc
DocsSORTN

SORTN

The first n rows of a range after sorting.

  • Excel: No equivalent
  • Google Sheets: Not checked yet
  • Returns: Array

Examples

=SORTN(A1:A5, 2)
A
1 10
2 20
3 30
4 40
5 50
Result 10

Syntax

SORTN(range, [n], [display_ties_mode], [sort_column], [is_ascending])
range
range required
n
number optional defaults to 1
display_ties_mode
number optional
sort_column
number optional defaults to 1
is_ascending
boolean optional defaults to 1