Filtering to extract data based on matching criteria is a traditionally hard problem in Excel.
However, the new FILTER function makes this task much easier.
The FILTER function is designed to extract data from a list or table using supplied criteria.
In this worksheet, we have data that contains names, scores, and groups.
Our goal is to use the FILTER function to filter the data by group.
I’ll start off by placing the cursor in cell F5, then typing an equals sign (=) and the first few letters of “filter”. Once we have a match, I’ll press the TAB key.
The first argument is called “array”. This is the data we want to filter. In this case, that’s the range B5:D14.
Next, we need to provide an argument called "include". The include argument is actually what does the filtering. This needs to be a boolean array, or an expression that creates a boolean array, with a size compatible with the data we are filtering.
In this case, that means it must have the same number of rows.
Let's filter on the Blue group. To do this, I enter the expression D5:D14="blue".
Note that FILTER is not case-sensitive.
The next argument is the optional "is empty" argument. This message only appears when FILTER can find no matching data.
I'll use "no results" in double quotes. When I hit enter, FILTER extracts just the data in the blue group.