Explanation

Although FILTER is commonly used to filter rows, you might also filter columns.

The trick is to use anincludeargument that operates on columns instead of rows.

Note: thenamed rangedatais used for convenience only; a regular range reference will also work fine.

Excel formula: FILTER to remove columns

This array is delivered to theUNIQUE function, which can automatically extract unique values from data with adjacent columns.

The SORT function is optional and can be removed.

This is a nice example ofnestingone function inside another.

Excel formula: Basic filter example

When you see a formula created this way, learn to read from the inside out.

The inner functions deliver values to the outer functions.

The outermost function returns the final result.

Excel formula: Filter this or that

The output from FILTER is dynamic.

If source data or criteria change, FILTER will return a new set of results.

Values can be sorted by one or more columns.

Excel formula: Filter text contains

SORT returns a dynamic array of results.

Excel formula: Filter exclude blank values

Excel FILTER function

Excel UNIQUE function

Excel SORT function