1. Sort & Filter Matching Rows Together (SORT + FILTER)
Wrap FILTER inside SORT to extract rows matching a condition and order them automatically (column index 1 = first column, 2 = second column; 1 = ascending, -1 = descending):
=SORT(FILTER(A2:C100, C2:C100="Active", "No Matches"), 1, 1)
2. Sort & Deduplicate a Single Column (SORT + UNIQUE)
To extract a clean, sorted list of distinct categories or client names from a column:
=SORT(UNIQUE(B2:B100), 1, 1)
Worked Example: Filtered & Sorted Active Records
| Col A (Client) | Col C (Status) | Result in =SORT(FILTER(A2:C4, C2:C4="Active", "No Matches"), 1, 1) |
|---|---|---|
| Northstar Retail | Active | Row 1 (alphabetical first among Active) |
| Harbor Goods | Paused | Excluded (Status is Paused) |
| Crest Studio | Active | Row 2 (alphabetical second among Active) |
Preventing Dynamic Array Errors
#SPILL!error: Clear any text or values in cells below or to the right of the formula where the output table expands.- Empty match results: Always supply a fallback message in
FILTER(or wrap with IFERROR in Google Sheets) when zero rows match. - Trailing spaces in filter column: Clean text with TRIM so stray spaces do not prevent exact matches.