Filter Functions – FILTER, SORT, SORTN, and UNIQUE

Google Sheets offers functions for sorting and filtering data. On the desktop version of Sheets, the SORT and FILTER functions are available through the menus as shown in the pictures below, while the tablet version has a ‘Create a filter’ option in the more (three circles in a vertical line) menu on the right-hand side of the screen.

Filter buttons on the menu

Filter button on the desktop toolbar

Sort options in the menu

Sort options in the desktop menus

The UNIQUE function removes duplicate rows of data in a spreadsheet. The SORTN function returns n number of items from a range of data.

If you are nesting these functions to use abilities from more than one, you may want to use the more flexible QUERY function instead. It brings the power of SQL queries into spreadsheet functions.

All Filter Functions

Google Sheets' helper text for the FILTER function
FILTER Function
Help text for the SORT function
SORT Function
Help text for the SORTN function

SORTN function

Help text for the UNIQUE function
UNIQUE Function

StaySorted Add-On StaySorted Logo

If you’re using the menus to sort your data, you must redo it when you add a new row. This can slow you down, especially when working with a large spreadsheet. The StaySorted add-on is a great solution for this problem. It automatically sorts any new entries in your spreadsheet, so you don’t have to worry about it.

Video Tutorials

Thumbnail showing screen shot of FILTER video tutorial
FILTER Function
Thumbnail showing screen shot of UNIQUE function
UNIQUE Function
Thumbnail showing screen shot of SORT function
SORT Function
Thumbnail showing screen shot of SORTN
SORTN Function