
{=IF(ISNUMBER(MATCH(data,filter,0)),data)}Related formulas
Most frequently occurring text
List most frequently occuring numbers
To filter a data in an array formula (to exclude or require certain values), you can use an array formula based on the IF, MATCH, and ISNUMBER functions.
In the example shown, the formula in H5:
{=COUNT(IF(ISNUMBER(MATCH(data,filter,0)),data))}where "data" is the named range B4:D11 and "filter" is the named range F4:F6.
Note: this is an array formula and must be entered with control + shift + enter.
The final array looks like this:
{1,FALSE,3;FALSE,4,FALSE;FALSE,FALSE,FALSE;1,FALSE,3;FALSE,FALSE,FALSE;3,FALSE,FALSE;FALSE,4,FALSE;FALSE,FALSE,4}
COUNT is only used to verify the result.
In cell H6 the formula has been modified to exclude values using 1-ISNUMBER like so:
=COUNT(IF(1-ISNUMBER(MATCH(data,filter,0)),data))
This effectively reverses the array output in step #2 above.

{=IF(ISNUMBER(MATCH(data,filter,0)),data)}Related formulas
Most frequently occurring text
List most frequently occuring numbers
To filter a data in an array formula (to exclude or require certain values), you can use an array formula based on the IF, MATCH, and ISNUMBER functions.
In the example shown, the formula in H5:
{=COUNT(IF(ISNUMBER(MATCH(data,filter,0)),data))}where "data" is the named range B4:D11 and "filter" is the named range F4:F6.
Note: this is an array formula and must be entered with control + shift + enter.
The final array looks like this:
{1,FALSE,3;FALSE,4,FALSE;FALSE,FALSE,FALSE;1,FALSE,3;FALSE,FALSE,FALSE;3,FALSE,FALSE;FALSE,4,FALSE;FALSE,FALSE,4}
COUNT is only used to verify the result.
In cell H6 the formula has been modified to exclude values using 1-ISNUMBER like so:
=COUNT(IF(1-ISNUMBER(MATCH(data,filter,0)),data))
This effectively reverses the array output in step #2 above.