+ Reply to Thread
Results 1 to 9 of 9

dynamic dropdown based on two matches

  1. #1
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    dynamic dropdown based on two matches

    I am trying to create a dynamic dropdown based on two matches. If A=F and B=G then validate C with H.

    I tried to use the following, but am getting an error:

    =OFFSET(F2,MATCH(A3:B3,F3:G15,0),1,COUNTIF(F3:G15,A3:B3),1)

    Thanks gurus!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: dynamic dropdown based on two matches

    Like this?
    =FILTER(H3:H15,(F3:F15=A3)*(G3:G15=B3)) (say this formula is in cell C13)

    You can then reference the output in the data validation list for the dropdown via =C13#

  3. #3
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    Re: dynamic dropdown based on two matches

    Thanks RaulSerg! I don't have Filter as a valid function. Help indicates it is only available to Microsoft 365 subscribers in the Monthly Channel. Is there another option for those of us who can't access this function?

  4. #4
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: dynamic dropdown based on two matches

    You can try this, enter as array with Ctrl+Shift+Enter and then copy down as far as necessary

    =INDEX(H$3:H$15,SMALL(IF((G$3:G$15=$B$3)*($A$3=F$3:F$15),ROW(H$3:H$15)-ROW(H$3)+1,""),ROWS(F21:F$21)))

    You can wrap around IFERROR if required.

    You can use the result range then in data validation.
    If you need it to be dynamic (expanding range), you will need to create a name with a dynamic range with either OFFSET or INDEX.

    In my case the function is entered in F21 which is why I use the mixed reference F21:F$21 as anchor in the last range.

    Regards

  5. #5
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    Re: dynamic dropdown based on two matches

    Thanks RaulSerg!

    I need a dynamic range and tried to add this with OFFSET and COUNTIF but am not having any luck:

    =OFFSET(H2,INDEX(H$3:H$15,SMALL(IF((G$3:G$15=$B$3)*($A$3=F$3:F$15),ROW(H$3:H$15)-ROW(H$3)+1,""),ROWS(C3:C$3))),1,COUNTIF(H3:H15,C3),1)

    Any suggestions?

  6. #6
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: dynamic dropdown based on two matches

    Just count the outcomes and put it into a range name.
    I eleminated the errors via e.g.: =IFERROR(INDEX(H$3:H$15,SMALL(IF((G$3:G$15=$B$3)*($A$3=F$3:F$15),ROW(H$3:H$15)-ROW(H$3)+1,""),ROWS(F21:F$21))),"")

    Then create a range name, e.g. 'DynamicRange', Refers To: =OFFSET(Sheet1!$F$21,,,COUNTA(Sheet1!E21:E30)-COUNTBLANK(Sheet1!E21:E30))

    The Range E21:E30 is arbitrary but long enough to capture the max number of outcomes.
    Then put the range name into Data Validation, List, Source =DynamicRange

    Regards

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: dynamic dropdown based on two matches

    Use this:
    Please Login or Register  to view this content.
    Quang PT

  8. #8
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: dynamic dropdown based on two matches

    If the data is shuffled, this formula might fail though.
    E.g. all the values that OFFSET combines need to be a contiguous range in the original data set.
    Last edited by AliGW; 05-23-2020 at 03:11 AM. Reason: Please don't quote unnecessarily!

  9. #9
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    Re: dynamic dropdown based on two matches

    Thank you RaulSerg! That worked!

+ 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. Dynamic Tables Based On Dropdown
    By polishfc in forum Excel General
    Replies: 1
    Last Post: 03-11-2020, 11:08 AM
  2. Dynamic Dropdown Based on Cell Value
    By kapilrakh in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2018, 08:20 PM
  3. [SOLVED] Dynamic Graphing timeline based on 2 dropdown criteria
    By GuruWannaB in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-28-2018, 12:40 AM
  4. Dynamic Update of Trend Function Based on Dropdown List
    By Mathias25 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-17-2017, 07:14 PM
  5. Dynamic chart based on three dropdown menus.
    By Bjfgroot in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-30-2014, 03:43 AM
  6. Dynamic dropdown list selection based on combo box
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-10-2012, 10:55 AM
  7. Dynamic dropdown menu based on two criteria
    By Darsk in forum Excel General
    Replies: 5
    Last Post: 09-18-2011, 05:31 PM

Tags for this Thread

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