+ Reply to Thread
Results 1 to 5 of 5

Three Data Validation Lists: Third List works from first two Lists BUT...

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2010
    Posts
    6

    Exclamation Three Data Validation Lists: Third List works from first two Lists BUT...

    Good Evening and Thank You in advance for reviewing my question!

    I have attached a spreadsheet for my question below.

    In Summary here's what I have:
    Columns B:D is a full list of data to match against
    Column F is a List of States that is used as a Data Validation List in Cell J9
    Column H is a List of Issues that is used as a Data Validation List in Cell K9

    Cell L9 is where I need help please!

    I would like the Cell L9 to be the 3rd Validation List that uses the criteria from the "State Validation List" and the "Issue Validation List" and compares it against columns B and C and the List would return results of Column D in the drop-down.

    I do not want State List or Issue List population to be mandatory - meaning:
    State List J9 can be non-null & Issue List K9 can be null = L9 would return a result of all Directory Names matched to the State selected/ALL Issues
    ---OR---
    State List J9 can be null & Issue List K9 can be non-null = L9 would return a result of all Directory Names matched to the ALL States/Issue selected
    ---OR---
    State List J9 can be non-null & Issue List K9 can be non-null = L9 would return a result of all Directory Names matched to the State & Issue selected

    If someone would be so kind and help me with the Source formula needed for L9 I would REALLY appreciate it!!!
    Thanks in advance,
    Erin M.
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Three Data Validation Lists: Third List works from first two Lists BUT...

    Hi Erin,
    Welcome to the forum.

    This can be achieved easily with the help of VBA Code.
    In the attached, I have inserted a new Sheet named List which is hidden right now.
    Now in col. L, starting from Row9, you will find a Data Validation List which is dependent upon what is selected in corresponding cells in col. J and K.

    Since this is a Macro-Enabled File so you will need to enable the Macro when prompted while opening the file.
    Attached Files Attached Files
    Last edited by sktneer; 03-05-2016 at 07:01 AM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Three Data Validation Lists: Third List works from first two Lists BUT...

    Non=VBA solution

    Create 3 DV lists in Sheet2 as named ranges DV1, DV2 and DV3

    in A2

    =IFERROR(IF(AND(Sheet1!$J$9<>"",Sheet1!$K$9=" "),INDEX(Sheet1!$D$9:$D$1000,SMALL(IF(Sheet1!$B$9:$B$1000=Sheet1!$J$9,ROW($A$9:$A$1000)-ROW($A$9)+1,""),ROWS($A$9:A9)),),""),"")

    in B2

    =IFERROR(IF(AND(Sheet1!$J$9=" ",Sheet1!$K$9<>" "),INDEX(Sheet1!$D$9:$D$1000,SMALL(IF(Sheet1!$C$9:$C$1000=Sheet1!$K$9,ROW($A$9:$A$1000)-ROW($A$9)+1,""),ROWS($A$9:B9)),),""),"")

    in C2

    =IFERROR(IF(AND(Sheet1!$J$9<>" ",Sheet1!$K$9<>" "),INDEX(Sheet1!$D$9:$D$1000,SMALL(IF((Sheet1!$B$9:$B$1000=Sheet1!$J$9)*(Sheet1!$C$9:$C$1000=Sheet1!$K$9),ROW($A$9:$A$1000)-ROW($A$9)+1,""),ROWS($A$9:C9)),),""),"")


    Enter ALL formulas above with Ctrl+Shift+Enter and copy down

    in D2 (Named range DVList)

    =IF(AND(Sheet1!$J$9<>" ",Sheet1!$K$9=" "),1,IF(AND(Sheet1!$J$9=" ",Sheet1!$K$9<>" "),2,3))

    on Sheet1

    DV for L9

    List

    Source: =CHOOSE(DVList,DV1_,DV2_, DV3_)


    See attached
    Attached Files Attached Files
    Last edited by JohnTopley; 03-06-2016 at 10:20 AM.

  4. #4
    Registered User
    Join Date
    07-17-2014
    Location
    St. Louis, MO
    MS-Off Ver
    2010
    Posts
    6

    Re: Three Data Validation Lists: Third List works from first two Lists BUT...

    Thank you both so much for your help with this! I really like having the option of the Macro version and non-macro version!!! I've marked this thread as Solved. Again, thanks for your help!

    Erin M.

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Three Data Validation Lists: Third List works from first two Lists BUT...

    You're welcome Erin! Glad we could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Data Validation lists - entering value not in list
    By rgarber50 in forum Excel General
    Replies: 4
    Last Post: 11-17-2016, 12:48 PM
  2. Replies: 3
    Last Post: 06-04-2015, 02:27 PM
  3. [SOLVED] data validation lists - drop down lists too small
    By reglook0736 in forum Excel General
    Replies: 3
    Last Post: 04-24-2015, 12:49 PM
  4. [SOLVED] How to use Data validation List for multiple Lists
    By bdouglas1011 in forum Excel General
    Replies: 6
    Last Post: 09-11-2014, 06:52 PM
  5. How to use data validation for Mutiple lists dependant on one list
    By excel66 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-12-2011, 02:21 AM
  6. Replies: 3
    Last Post: 09-02-2010, 03:04 AM
  7. Replies: 2
    Last Post: 04-21-2008, 04:12 PM

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