Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to filter data from drop down list selection in Excel?

Author Xiaoyang Last modified

In Excel, most of us may filter data by using the Filter feature. But, have you ever tried to filter data from the drop down list selection? For example, when I select one item from the drop down list, I want its corresponding rows will be filtered out as following screenshot shown. This article, I will talk about how to filter data by using drop down list in one or two worksheets.

a screenshot of using drop-down list to filter data

Filter data from drop down list selection in one worksheet with helper formulas

Filter data from drop down list selection in two worksheets with VBA code


Filter data from drop down list selection in one worksheet with helper formulas

To filter data from drop down list, you can create some helper formula columns, please do with the following steps one by one:

1. First, insert the drop down list. Click a cell where you want to insert the drop down list, then click Data > Data Validation > Data Validation, see screenshot:

a screenshot of enabling the Data Validation feature

2. In the popped out Data Validation dialog box, under the Settings tab, select List from the Allow drop down, and then click a screenshot of the selection button button to choose the data list you want to create the drop down list based on, see screenshot:

a screenshot of configuring the Data Validation dialog box

3. And then click OK button, the drop down list is inserted at once, and choose one item from the drop down list, then enter this formula: =ROWS($A$2:A2) (A2 is the first cell within the column which contains the drop down list value) into cell D2, and then drag the fill handle down to the cells to apply this formula, see screenshot:

a screenshot of using the ROWS function to create a helper column with sequence numbers

4. Go on entering this formula: =IF(A2=$H$2,D2,"") into cell E2, and then drag the fill handle down to fill this formula, see screenshot:

Note: In the above formula:A2 is the first cell within the column which contains the drop down list value,H2 is the cell where drop down list placed, D2 is the first helper column formula.

a screenshot of using formula to create the second helper column

5. And then type this formula: =IFERROR(SMALL($E$2:$E$17,D2),"") into cell F2, then drag the fill handle down to the cells to fill this formula, see screenshot:

Note: In the above formula: E2:E17 is the second helper formula cells, D2 is the first cell in first helper formula column.

a screenshot of using formula to create the third helper column

6. After inserting the helper formula columns, then you should output the filtered result into another location, please apply this formula: =IFERROR(INDEX($A$2:$C$17,$F2,COLUMNS($J$2:J2)),"") into cell J2, and then drag the fill handle from J2 to L2, and the first record of the data based on the drop down list has been extracted, see screenshot:

Note: In the above formula: A2:C17 is the original data you want to filter, F2 is the third helper formula column, J2 is the cell where you want to output the filter result.

a screenshot of using formula to get the first filtered row based on the selection of the drop-down list

7. And then go on dragging the fill handle down to the cells to display all corresponding filtered records, see screenshot:

a screenshot shows all filtered results

8. From now on, when you select one item from the drop down list, all rows based on this selection are filtered at once, see screenshot:

a screenshot of different filtered results based on the selection of the drop-down list

a screenshot of drop-down list collection of Kutools

Supercharge Excel Dropdown Lists with Kutools Enhanced Features

Elevate your productivity with Kutools for Excel's enhanced dropdown list capabilities. This feature set goes beyond basic Excel functionalities to streamline your workflow, including:

  • Multi-select Dropdown List: Select multiple entries simultaneously for efficient data handling.
  • Dropdown List with Check Boxes: Enhance user interaction and clarity within your spreadsheets.
  • Dynamic Dropdown List: Automatically updates based on data modifications, ensuring accuracy.
  • Searchable Dropdown List: Quickly locate needed entries, saving time and reducing hassle.
Download now for a free 30-day trial and transform your Excel experience!

Filter data from drop down list selection in two worksheets with VBA code

If your drop down list cell in Sheet1, and the filtered data in Sheet2, when choosing one item from the drop down list, another sheet will be filtered out. How could you finish this job in Excel?

The following VBA code may do you a favor, please do as this:

1. Right click the sheet tab which contains the drop down list cell, and then choose View Code from the context menu, in the opened Microsoft Visual Basic for applications window, copy and paste the following code into the blank Module:

VBA code: Filter data from drop down list selection in two sheets:

Private Sub Worksheet_Change(ByVal Target As Range)
'Updateby Extendoffice
    On Error Resume Next
    If Not Intersect(Range("A2"), Target) Is Nothing Then
        Application.EnableEvents = False
        If Range("A2").Value = "" Then
            Worksheets("Sheet2").ShowAllData
        Else
            Worksheets("Sheet2").Range("A2").AutoFilter 1, Range("A2").Value
        End If
        Application.EnableEvents = True
    End If
End Sub

Note: In the above code: A2 is the cell which contains the drop down list, and Sheet2 is the worksheet contains the data you want to filter. The number 1 in the script: AutoFilter 1 is the column number that you want to filter based on. You can change them to your need.

a screenshot showing how to use the VBA code

2. From now on, when you select one item from the drop down list in Sheet1, and the corresponding data will be filtered out in Sheet2, see screenshot:

a screenshot showing the selection of the drop-down list and the corresponding filtered results


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


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!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in