You can use the Advanced Filter function in Excel to filter the values in one column based on the values in another column.
The following examples show how to do so.
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 E and we would like to filter the rows in the dataset to only contain the team names in column A that belong to column E:
To perform this filter, click the Data tab and then click the Advanced Filter button:
We’ll choose A1:C11 as the list range and E1:E5 as the criteria range:
Once we click OK, the dataset will be filtered to only show rows where the team name in column A is equal to one of the team names in column E:
Note that the Advanced Filter will only work if the column header of the criteria range matches the column header of the list range.
For example, this particular Advanced Filter worked because the column header of the criteria range and the list range were both Team.
The following tutorials explain how to perform other common tasks in Excel: