Formulas > =SORTN()

How To Use SORTN() Function in Google Sheets

Description

Returns the first n items in a data set after performing a sort.

How To Actually Use SORTN() in Sheets

SORTN(range, [n], [display_ties_mode], [sort_column1, is_ascending1], ...)

Try SORTN yourself

Use the range A1:A10 to return the first 5 unique values sorted in ascending order. Your formula should only include the necessary arguments to achieve this.

Hints (3)

Looking for a video tutorial? Members can email me anytime! Check out the blogs below for more info on this formula. Or generate your formula. Find more formulas here at BetterSheets.co/formulas

Learn more about the SORTN() formula:

Generate a SORTN() formula for your needs

Describe your task in plain English and get a paste-ready formula that uses SORTN(). 2 free AI generations, no signup. Members get unlimited use.

Generate a SORTN() formula