You can use the following basic formula to filter a column by multiple values in Google Sheets:
=FILTER(A1:C11, REGEXMATCH(A1:A11, "string1|string2|string3"))
This particular formula will filter the rows in the range A1:C11 to only show the rows where the value in the range A1:A11 is equal to either string1, string2, or string3.
The following example shows how to use this formula in practice.
Example: Filter Column by Multiple Values in Google Sheets
Suppose we have the following dataset that contains information about various basketball players:
Now suppose we’d like to filter the dataset to only show rows where the Team column contains Heat or Celtics.
To do so, we can use the following formula:
=FILTER(A1:C11, REGEXMATCH(A1:A11, "Heat|Celtics"))
The following screenshot shows how to use this formula in practice:
Notice that the filtered dataset only contains the rows where the team is equal to Heat or Celtics.
Also note that you can filter for rows where the team name is not equal to Heat or Celtics by using the NOT function outside of the REGEXMATCH function as follows:
=FILTER(A1:C11, NOT(REGEXMATCH(A1:A11, "Heat|Celtics")))
The following screenshot shows how to use this formula in practice:
Notice that the filtered dataset only contains the rows where the team is not equal to Heat or Celtics.
Additional Resources
The following tutorials explain how to perform other common tasks in Google Sheets:
Google Sheets: How to Filter Using Custom Formula
Google Sheets: How to Filter from Another Sheet
Google Sheets: How to Filter with Multiple Conditions