Google Sheets: Filter One Column Based on Another Column


You can use the FILTER function along with the MATCH function in Google Sheets to filter the values in one column based on the values in another column.

For example, you can use the following syntax to filter the range A2:B12 for rows where the value in the range A2:A12 contains one of the values from the range D2:D4:

=FILTER(A2:B12, MATCH(A2:A12, D2:D4, 0))

The following example shows how to use this formula in practice.

Example: Filter One Column Based on Another Column

Suppose we have the following dataset that contains information about various basketball players:

Suppose we define a list of specific team names in column D and we would like to filter the rows in the dataset to only contain the team names in column A that belong to column D:

To perform this filter, we can type the following formula into cell A14:

=FILTER(A2:B12, MATCH(A2:A12, D2:D4, 0))

The following screenshot shows how to use this formula in practice:

Google Sheets filter column based on another column

Notice that the dataset is filtered to only show rows where the team name in column A is equal to one of the team names in column D.

Note: You can find the complete documentation for the FILTER function in Google Sheets here.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

Google Sheets: How to Use FILTER Function with AND
Google Sheets: How to Use FILTER Function with OR
Google Sheets: How to Use FILTER with Wildcard

Leave a Reply

Your email address will not be published. Required fields are marked *