How to filter rows based on a list selection in another sheet?
In Excel, we usually filter rows based on a criteria, but if there are two list, one is in Sheet1, and another in Sheet2, could you have any tricks to quickly filter rows in Sheet1 based on the list in Sheet2 as below screenshot shown? Here, I introduce the ways on solving this job.
To filter rows based on a selection, you can apply the Advanced Filter function.
1. Select the column list you want to filter, and click Data > Advanced in the Sort & Filter group. See screenshot:
2. Then in the Advanced Filter dialog, check Filter the list, in-place option, and you can see the selected list you want filter have been added into the List range, and click in the Criteria range to choose the list you want to filter based on. See screenshot:
3. Click OK. Now the list has been filtered based on another list. See screenshot:
With a formula, you also can filter the rows based on a list selection.
1. Select a blank cell next to the rows you want to filter, and enter this formula =COUNTIF(Sheet2!$A$2:$A$6, A2), and press Enter, then drag the auto fill handle down to apply this formula to the cells. See screenshot:
Note: in the formula, Sheet2!A2:A6 is the list you want to filter based on.
2. Select the column including the formulas, and then click Data > Filter to apply Filter function. See screenshot:
3. Click the Filter icon in the formula column, only check 1 in the drop down list. See screenshot:
4. Click OK. Now the rows have been filter based on the list in Sheet2.
If you want to compare two lists, and then extract rows based on another list, you can apply Kutools for Excel’s Select Same & Different Cells utility, it can compare two ranges and then select the same rows, and then you can extract the rows to another location as you need.
|Kutools for Excel, with more than 300 handy functions, makes your jobs more easier.|
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
1. Select the list you want to filter firstly, and click Kutools > Select > Select Same & Different Cells. See screenshot:
2. In the popping dialog, select in the According to text box to select the criteria list, and check Each row and Same Values options, go to check Select entire rows option, too. If the selection including headers, please check My data has headers. See screenshot:
3. Click Ok, a dialog pops out to remind the number of all same rows selected, click OK to close it. Now the same rows have been selected.
4. Then press Ctrl + C to copy the selected cells, and select a cell and press Ctrl + V to locate the rows.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 22 days agoHiI'm trying this but hoping to use a drop down selection to make my pick. When I first add the advanced filter it works, but the hope was to then change the drop down option to something else and have the table re-filter and show the row with the new selection. This doesn't work though. Any ideas of how to get something like that working? Surely that is the optimal solution for this?
- To post as a guest, your comment is unpublished.· 2 years agoThe Advanced filter does nothing. I click it and no filter applies and no changes have applied
- To post as a guest, your comment is unpublished.· 2 years agoIn the criteria range, make sure the header text matches the list range header text. In addition, select the cells from the header to the last row, not the entire column. It didn't work for me at first too then I give it another try with same headers and after restricting the criteria list to the filled cells, it worked.
- To post as a guest, your comment is unpublished.· 1 years agothanks that did the trick
- To post as a guest, your comment is unpublished.· 2 years agoDear, Please help to know as how to arrange data in one row by use comma (,) from a list in one column such as
from one column
to in one row
- To post as a guest, your comment is unpublished.· 2 years agoI have not understand your question clearly. You mean to transpose a list into a cell and separated data by comma? If so, you only need to apply Kutools for Excel's Combine Rows and Columns utility to combine all data into one cell by comma. Let me know if it help. Thank u.