How to Filter a Column by Multiple Values in Google Sheets
Filtering a column by multiple values in Google Sheets can be done using the "Filter" function or by creating a filter view. Here's how you can use both methods:
Using the Filter function
- Click on an empty cell where you want the filtered data to appear.
- Type the following formula, replacing "A1:A" with the range you want to filter, and "value1" and "value2" with the values you want to filter by:
=FILTER(A1:A, (A1:A = "value1") + (A1:A = "value2"))
For example, if you want to filter column A for the values "Apple" and "Orange", you would use the following formula:
=FILTER(A1:A, (A1:A = "Apple") + (A1:A = "Orange"))
- Press Enter to apply the formula. The filtered data will appear in the selected cell.
Using a filter view
- Select the range you want to filter.
- Click "Data" in the top menu.
- Select "Create a filter" or "Filter views" > "Create new filter view".
- Click the filter icon that appears in the header of the column you want to filter.
- Select "Filter by condition".
- In the dropdown menu, choose "Custom formula is".
- Enter the following formula, replacing "A" with the column letter and "value1" and "value2" with the values you want to filter by:
=(A1="value1")+(A1="value2")
For example, if you want to filter column A for the values "Apple" and "Orange", use the following formula:
=(A1="Apple")+(A1="Orange")
- Click "OK" to apply the filter. The column will be filtered by the specified values.
Example
Let's say you have a list of fruits in column A, and you want to filter the list to only show "Apple" and "Orange" in column C.
- Click on an empty cell in column C, where you want the filtered data to appear.
- Type the following formula:
=FILTER(A1:A, (A1:A = "Apple") + (A1:A = "Orange"))
- Press Enter to apply the formula. The filtered data will appear in column C, showing only "Apple" and "Orange" from column A.
Did you find this useful?