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.
Lessons in this topic
- 1List each value once with UNIQUEPlusAbout 4 minutes
Use UNIQUE to turn a column with repeats into a list of distinct customers or products that spills down by itself.
- 2Pick out rows with FILTERPlusAbout 5 minutes
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!.
- 3FILTER with two conditionsPlusAbout 5 minutes
Filter rows that meet both conditions with (test)*(test), or either one with (test)+(test), in Excel and Google Sheets.
- 4Sort a list with SORT and SORTBYPlusAbout 5 minutes
Use SORT to put a list in order, highest first with -1, and SORTBY to order one column by the values in another.
- 5Practice with lists that spillPlusAbout 6 minutes
Mixed practice: pick UNIQUE, FILTER, SORT or SORTBY for each task, and put two together, like SORT around UNIQUE.