+ Reply to Thread
Results 1 to 17 of 17

Dropdown list based on two criteria

  1. #1
    Registered User
    Join Date
    07-09-2011
    Location
    Melbourne
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Dropdown list based on two criteria

    Hi,

    Thanks in advance for any thoughts or assistance you can provide. I am trying to create a drop down list that is dependent on two criteria. To depict the issue, I've created a mock-example about sports.

    On my 'data' sheet:
    Column 1: Name of sport
    Column 2: City
    Column 3: Name of sporting team

    On my 'form' sheet:
    Cell 1: Dropdown list to select name of sport
    Cell 2: Dropdown list to select city
    Cell 3: I want this cell to be a dropdown list of names of sporting teams, based on the conditions set by Cell 1 & 2.

    Example is attached.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,732

    Re: Dropdown list based on two criteria

    This may be prove helpful

    http://contextures.com/xlDataVal02.html

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-09-2011
    Location
    Melbourne
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Dropdown list based on two criteria

    Thanks for your response Alan.

    The method you suggested would require to keep the data organised in lists. I am rather hoping for a solution that can dynamically search a large spreadsheet of 500 rows for the rows that meet the criteria.

    For example, if I were to select the name of sport and city, I'd like the third dropdown list to search through 500 rows for all the names of sporting teams that meet that criteria.

    Any further thoughts?

    Cheers!
    Brendan

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Dropdown list based on two criteria

    HTH
    Regards, Jeff

  5. #5
    Registered User
    Join Date
    07-09-2011
    Location
    Melbourne
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Dropdown list based on two criteria

    Hi Jeffrey,

    I don't think that's it either. That solution requires me to keep the lists of data in columns.

    Each row of data in my spreadsheet will contain ~20 columns, each specifying some detail about the sporting team.

    I am hoping that the the data validation can dynamically search through the rows to extract a list of teams that match the criteria defined by the two previous drop down lists.

    Otherwise, I'll need to keep the lists in columns, as well as the data in rows in another spreadsheet.

    Thanks again,
    Brendan

    Quote Originally Posted by jeffreybrown View Post

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Dropdown list based on two criteria

    I have to run to the airport, but chech this out and see if it could work for you. I'll be back in about an hour.

    It uses VBA and on the Form tab click on the button and the advanced filter will extract unique records and populate a dynamic named range.

    I know it needs some more work but need to see if this is something you can work with?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-09-2011
    Location
    Melbourne
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Dropdown list based on two criteria

    Yes, great, this is something I can work with. I'm going to try knock this out on my own from here.

    Thank you very much.

    Quote Originally Posted by jeffreybrown View Post
    I have to run to the airport, but chech this out and see if it could work for you. I'll be back in about an hour.

    It uses VBA and on the Form tab click on the button and the advanced filter will extract unique records and populate a dynamic named range.

    I know it needs some more work but need to see if this is something you can work with?

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dropdown list based on two criteria

    you can do it like this no code required ,not quite what you said as cities are not dependent on sport but i'd assume most sports are played in most cities anyway
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Registered User
    Join Date
    07-09-2011
    Location
    Melbourne
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Dropdown list based on two criteria

    Hi Martin,

    I am OK with the city not being dependant, on sport. The important factor is having team name being dependant on sport&city.

    Thanks, I'll look at this properly later today.

    Brendan

    Quote Originally Posted by martindwilson View Post
    you can do it like this no code required ,not quite what you said as cities are not dependent on sport but i'd assume most sports are played in most cities anyway

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dropdown list based on two criteria

    i've revised it a bit to auto get cities/sports
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-09-2011
    Location
    Melbourne
    MS-Off Ver
    Mac Excel 2011
    Posts
    6

    Re: Dropdown list based on two criteria

    Quote Originally Posted by martindwilson View Post
    i've revised it a bit to auto get cities/sports
    Hi Martin,

    Thanks for the addition.

    Just wondering, can you briefly explain the purpose of "Sheet1"?

    Cheers.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dropdown list based on two criteria

    it does nothing delete it -i was just testing something

  13. #13
    Registered User
    Join Date
    05-07-2011
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Office 365
    Posts
    27

    Re: Dropdown list based on two criteria

    Hi,

    I'm actually facing such a similar problem by auslistener1. I want to create a dropdown list that is filtered based on 2 criterias.

    My data has more than 60,000 rows covering 3 columns, so the example at the contextures.com wouldn't be helpful to me.

    Worksheet2
    Column A - filled with customer id
    Column B - filled with items bought by each customer
    Column C - filled with the corresponding prices for the item.

    The list looks like this

    Please Login or Register  to view this content.
    Worksheet1

    BDR001 item 1 <dropdown list contains 2 entries, 4.67 & 4.33>

    The example file is in the link below.
    http://www.mediafire.com/?953f79niv955q83

    Thank you.
    Last edited by gnulab; 07-26-2011 at 01:19 PM.

  14. #14
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Dropdown list based on two criteria

    Hello & Welcome to the Board,

    As per the forum rules, please start your own thread.

  15. #15
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    drop down list problem???? any help me....

    hii all,

    anybody can help me, how to create drop down list with keeping sequel number list
    i attach my file...

    i appreciated, thank you..
    Attached Files Attached Files

  16. #16
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dropdown list based on two criteria

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  17. #17
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: drop down list problem???? any help me....

    sorry...boss..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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