The output contains only rows from the source data where all three columns have a value.
The FILTER function is designed to extract data that matches one or more criteria. In this case, we want to apply criteria that requires all three columns in the source data (Name, Group, and Room) to have data. In other words, if a row is missing any of these values, we want to exclude that row from output.
To do this, we use three boolean expressions operating on arrays. The first expression tests for blank names:
B5:B15<>""// check names
The not operator (<>) with an empty string ("") translates to "not empty". For each cell in the range B5:B15, the result will be either TRUE or FALSE, where TRUE means "not empty" and FALSE means "empty". Because there are 11 cells in the range, we get 11 results in an array like this:
When the arrays that result from the three expressions above are multiplied together, the math operation coerces the TRUE and FALSE values to 1s and 0s. We use multiplication in this case, because we want to enforce "AND" logic: expression1 AND expression2 AND expression3. In other words, all three expressions must return TRUE in a given row.
Following the rules of boolean logic, the final result is an array like this:
This array is delivered directly to the FILTER function as the include argument. FILTER only includes the 6 rows that correspond to 1s in the final output.
This formula relies on the FILTER function to retrieve data based on a logical test built with simple expressions and boolean logic : ( D5:D14 = "red" ) + ( D5:D14 = "blue" ) After each expression is evaluated, we have the...
This formula relies on the FILTER function to retrieve data based on a logical test. The array argument is provided as B5:D14, which contains the full set of data without headers. The include argument is based on a logical test based on the ISNUMBER...
This formula relies on the FILTER function to retrieve data based on a logical test. The array argument is provided as B5:E15, which contains the full set of data without headers. The include argument is an expression that runs a simple test: E5:E15...
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.