Skip to content
SheetFluent

Dynamic arrays: UNIQUE, FILTER and SORT

These formulas don't give one answer. They give a whole list, from one formula in one cell, that spills into the cells below. UNIQUE drops repeats, FILTER keeps the rows that match a condition, and SORT and SORTBY put them in order.

UNIQUE, FILTER and SORT work in Microsoft 365, Excel 2021 and later, and Google Sheets; SORTBY is Excel only. If something is in the way of the list, Excel shows #SPILL!, and clearing the cells below brings the list back.

Start practicing

Lessons in this topic

  1. 1
    List each value once with UNIQUE

    Use UNIQUE to turn a column with repeats into a list of distinct customers or products that spills down by itself.

    PlusAbout 4 minutes
  2. 2
    Pick out rows with FILTER

    Use FILTER to list only the rows that meet a condition, and add a third part so an empty result says "None" instead of #CALC!.

    PlusAbout 5 minutes
  3. 3
    FILTER with two conditions

    Filter rows that meet both conditions with (test)*(test), or either one with (test)+(test), in Excel and Google Sheets.

    PlusAbout 5 minutes
  4. 4
    Sort a list with SORT and SORTBY

    Use SORT to put a list in order, highest first with -1, and SORTBY to order one column by the values in another.

    PlusAbout 5 minutes
  5. 5
    Practice with lists that spill

    Mixed practice: pick UNIQUE, FILTER, SORT or SORTBY for each task, and put two together, like SORT around UNIQUE.

    PlusAbout 6 minutes

Next topic: Summaries and rankings