+ Reply to Thread
Results 1 to 15 of 15

Datavalidation dropdown based on multiple criteria

  1. #1
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Datavalidation dropdown based on multiple criteria

    I have 3 dropdowns.

    Codes, Groups, Materials

    I have a table with data and I am trying to base the 3rd dropdown list on the selections of the first two.

    See attached for clarification.

    thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Datavalidation dropdown based on multiple criteria

    Hi Check it Out the attached file
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Datavalidation dropdown based on multiple criteria

    D14 DV Custom Formula

    =OFFSET(Table!$A$1,MATCH($D$12,Table!$E:$E,0)-1,5,LOOKUP(2,1/((Table!$A$1:$A$2823=D10)*(Table!$E$1:$E$2823=D12)),ROW(Table!$E$1:$E$2823))-MATCH($D$12,Table!$E:$E,0)+1)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by :) Sixthsense :) View Post
    D14 DV Custom Formula

    =OFFSET(Table!$A$1,MATCH($D$12,Table!$E:$E,0)-1,5,LOOKUP(2,1/((Table!$A$1:$A$2823=D10)*(Table!$E$1:$E$2823=D12)),ROW(Table!$E$1:$E$2823))-MATCH($D$12,Table!$E:$E,0)+1)
    Sixthsense, your code seems to match only drop down 2. For example, select 1ABA and Filter Media....you should only get 4 results. I really like your code because its one line.

    Thank you Naveed +rep

  5. #5
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Sixth,

    It actually shows the 4 its supposed to, but includes others...

    dropdown.png

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by Cboggie View Post
    It actually shows the 4 its supposed to, but includes others...
    At present I am not in my system, will give you the solution by tomorrow since currently in 2007 version of excel.

  7. #7
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Ok,

    Naveed's suggestion works great. Would it change the approach if I needed to have multiple sets of dropdowns accessing this same data? With using data validation lists, i will have to duplicate lots of data. These 3 drop-downs will be duplicated several times on the same sheet so users can choose multiple chemicals.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by Cboggie View Post
    Sixth, It actually shows the 4 its supposed to, but includes others...
    Please check ROWS 83 to 86 data.

    You should keep the sorted data to get the actual list.

  9. #9
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by :) Sixthsense :) View Post
    Please check ROWS 83 to 86 data.

    You should keep the sorted data to get the actual list.
    Yes, rows 83 to 86 is the only data the dropdown should show if I choose 1ABA and Filter Media, however, it shows much more.

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by Cboggie View Post
    Yes, rows 83 to 86 is the only data the dropdown should show if I choose 1ABA and Filter Media, however, it shows much more.
    Then what about Row 12 to 15 Data?

    Please keep unique data

  11. #11
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by :) Sixthsense :) View Post
    Then what about Row 12 to 15 Data?

    Please keep unique data
    Row 12 to 15 is for 1AAG

    83 to 86 is for 1ABA

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Datavalidation dropdown based on multiple criteria

    In E14 Cell

    =SUMPRODUCT(--MATCH(1,(Table!$E$1:$E$2823=$D$12)*(Table!$A$1:$A$2823=$D$10),0)-1)


    In D14 Cell Validation Formula


    =OFFSET(Table!$A$1,E14,5,LOOKUP(2,1/((Table!$A$1:$A$2823=D10)*(Table!$E$1:$E$2823=D12)),ROW(Table!$E$1:$E$2823))-E14+1)

    Refer the attached file
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by :) Sixthsense :) View Post

    Refer the attached file


    Awesome Sixth.....do you know why it brings in an extra?

    extradropdown.png

  14. #14
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by Cboggie View Post
    Awesome Sixth.....do you know why it brings in an extra?
    Just remove the +1 from the suggested formula

    =OFFSET(Table!$A$1,E14,5,LOOKUP(2,1/((Table!$A$1:$A$2823=D10)*(Table!$E$1:$E$2823=D12)),ROW(Table!$E$1:$E$2823))-E14+1)

  15. #15
    Registered User
    Join Date
    01-01-2005
    Posts
    56

    Re: Datavalidation dropdown based on multiple criteria

    Quote Originally Posted by :) Sixthsense :) View Post
    Just remove the +1 from the suggested formula
    I promise I tried that without luck. But today, it works

    Again, appreciate your 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. scatterplot based on datavalidation selection (interactive graph)
    By alexcrofut in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-21-2014, 11:18 AM
  2. Dropdown list based on two criteria
    By auslistener1 in forum Excel General
    Replies: 16
    Last Post: 08-27-2013, 06:11 AM
  3. [SOLVED] Dropdown List Based on Criteria
    By cychua in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-04-2013, 06:27 AM
  4. Unique dropdown list based on two criteria but...
    By Darsk in forum Excel General
    Replies: 2
    Last Post: 09-28-2011, 04:37 PM
  5. Dynamic dropdown menu based on two criteria
    By Darsk in forum Excel General
    Replies: 5
    Last Post: 09-18-2011, 05:31 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