Closed Thread
Results 1 to 8 of 8

Filtered Data Validation List

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    2

    Filtered Data Validation List

    I'm trying to create a simple data validation list that will change based on wether or not the data is needed.

    In my example I have two columns of data. One for project names and one for status (active or inactive).

    I want a data validation list of project names where only active projects names will show up on my list. That way as projects become inactive I can change the cell status to inactive and have the project no longer appear on my data validation list. I'm thinking there may be a formula that will lookup my project status and return only the active names for the list.

    Project Status
    Project 1 Active
    Project 2 Inactive
    Project 3 Active
    Project 4 Active
    Project 5 Inactive

    In this example my data validation list would only include Projects 1, 3 and 4

    Does anyone know how to do this? I'm open to creative solutions if there is not an easy way to do this.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Filtered Data Validation List

    You would have to extract the active projects to a new list then use the new list as the source for the dropdown.

    Like this:

    Data Range
    A
    B
    C
    D
    1
    Project
    Status
    -----
    Project
    2
    Project 1
    Active
    Project 1
    3
    Project 2
    Inactive
    Project 3
    4
    Project 3
    Active
    Project 4
    5
    Project 4
    Active
    6
    Project 5
    Inactive


    This array formula** entered in D2:

    =IFERROR(INDEX(A:A,SMALL(IF(B$2:B$6="Active",ROW(B$2:B$6)),ROWS(D$2:D2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.

    Then, as the source for your dropdown list use:

    =OFFSET(D2,,,COUNTIF(D2:D10,"?*"))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Filtered Data Validation List

    Thank you. I have no idea what I did here, but it works perfectly. I'll have to do some homework on INDEX

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Filtered Data Validation List

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  5. #5
    Registered User
    Join Date
    11-02-2017
    Location
    London
    MS-Off Ver
    365
    Posts
    1

    Re: Filtered Data Validation List

    Hi,

    How would I amend this to filter for multiple values such as "Active", "New", "Anything" but not "inactive"

    I tried turning the IF() function into an IF(OR()) but that returned every item in the list

    Thanks
    Marko

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Filtered Data Validation List

    Quote Originally Posted by bengio View Post
    Hi,

    How would I amend this to filter for multiple values such as "Active", "New", "Anything" but not "inactive"

    I tried turning the IF() function into an IF(OR()) but that returned every item in the list

    Thanks
    Marko
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    10-30-2023
    Location
    India
    MS-Off Ver
    Home and Office 2019
    Posts
    1

    Re: Filtered Data Validation List

    Hello Tony,


    You solution is excellent, and it worked.
    I was looking for the same for one of my requirements. Incidentally, I found FILTER() function but it works only with Office 365 whereas, I have Home and Office 2019.
    I took some time to understand your solution and worked out in bits which gave me a good understanding of the logic.

    Good day!

    Ram

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,717

    Re: Filtered Data Validation List

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however you are not allowed to piggy-back another member's thread, so please open your own with a suitable title and, if you wish, a link back to this thread.

    Please see Forum Rule #1 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to create a filtered validation list
    By jpronche in forum Excel General
    Replies: 7
    Last Post: 10-19-2013, 05:09 PM
  2. Replies: 3
    Last Post: 07-05-2013, 03:32 PM
  3. [SOLVED] Data Validation - using visible rows from filtered list
    By anandvh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 06:14 PM
  4. [SOLVED] Data Validation list with filtered data
    By rjtimmerman in forum Excel General
    Replies: 5
    Last Post: 01-18-2012, 03:00 PM
  5. Filtered Validation List based on other variables
    By t1mmclaren in forum Excel General
    Replies: 1
    Last Post: 05-27-2009, 12:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1