Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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.
doc filter based on selection 1

Filter rows based on a list selection with Advanced Filter function

Filter rows based on a list selection with formula

Extract rows based on a list selection with Kutools for Excelgood idea3

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

  Filter rows based on a list selection with Advanced Filter function

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:
doc filter based on selection 2

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 doc select icon in the Criteria range to choose the list you want to filter based on. See screenshot:
doc filter based on selection 3

3. Click OK. Now the list has been filtered based on another list. See screenshot:
doc filter based on selection 4


  Filter rows based on a list selection with formula

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:
doc filter based on selection 5

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:
doc filter based on selection 6

3. Click the Filter icon in the formula column, only check 1 in the drop down list. See screenshot:
doc filter based on selection 7

4. Click OK. Now the rows have been filter based on the list in Sheet2.
doc filter based on selection 8


  Extract rows based on a list selection with Kutools for Excel

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:
doc filter based on selection 9

2. In the popping dialog, select doc select icon 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:
doc filter based on selection 10

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.
doc filter based on selection 11

4. Then press Ctrl + C to copy the selected cells, and select a cell and press Ctrl + V to locate the rows.
doc filter based on selection 12


Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free 30-day trial of Office Tab!

ot excel

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Josh · 1 years ago
    The 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.
      Claudio Torres · 1 years ago
      In 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.
    Maksud · 2 years ago
    Dear, 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
    504020
    504020
    302080
    504020
    302080
    504020
    to in one row
    302080, 504020

    Thanks/Maksud
    • To post as a guest, your comment is unpublished.
      Sunny · 2 years ago
      I 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.