Filter list by entry in another cell

Posted on 2012-09-06
Last Modified: 2012-09-06
I would like to filter a list based on a value in a specific cell. Can this be done? Thanks!!
Question by:Euro5
    LVL 39

    Accepted Solution

    Right click the tab
    View Code
    Copy the attached code in the worksheet module, you should be all set

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not Intersect(Target, [c1]) Is Nothing Then
            With [a12].CurrentRegion
                .AutoFilter field:=1, Criteria1:=[c1]
            End With
        End If
    End Sub

    Open in new window


    Author Closing Comment

    Thank you Thomas!! Very much appreciated!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
    How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
    Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now