+ Reply to Thread
Results 1 to 6 of 6

Dynamic Data Validation List or ComboBox

  1. #1
    Registered User
    Join Date
    02-13-2015
    Location
    Boston, MA
    MS-Off Ver
    2013
    Posts
    10

    Dynamic Data Validation List or ComboBox

    I'm lost on a certain aspect of VBA. On my sheet [Main Screen], which is a custom cookbook, I have an activex combobox list corresponding with category and a data validation list corresponding with total time, and those are set up fine.

    I'm trying to find a way to make a data validation list, or ActiveX control box in $N$2 next to the recipe header. This list will look at the [Recipe Database] page and list each recipe title that falls into the selected category AND total time (I have a value of ANY to potentially return all titles).

    Is there a way to do this? All the other data on the page is pulled from the VLOOKUP function looking at the recipe title, and I can create workarounds to display it if I need to change comboboxes to data validation lists, or vice versa.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-29-2012
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Dynamic Data Validation List or ComboBox

    Here is an example with formulas and data validation. It will be much more powerful with VBA but I do not have time to write the whole code for you.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-13-2015
    Location
    Boston, MA
    MS-Off Ver
    2013
    Posts
    10

    Re: Dynamic Data Validation List or ComboBox

    Thanks for this, I'm currently trying to deconstruct the code to see exactly what you did but more importantly, how!

  4. #4
    Registered User
    Join Date
    02-13-2015
    Location
    Boston, MA
    MS-Off Ver
    2013
    Posts
    10

    Re: Dynamic Data Validation List or ComboBox

    So I'm at the part of the code where you create the LARGE function. I understand the function prior to that and that everything after and including the COUNTIFS function is trying to point to the kth value of the LARGE function. I just don't understand how the array is constructed

    I know the function works as it's supposed to, but I can't understand exactly how. If you don't mind clarifying this one part, I'd appreciate it

  5. #5
    Registered User
    Join Date
    02-13-2015
    Location
    Boston, MA
    MS-Off Ver
    2013
    Posts
    10

    Re: Dynamic Data Validation List or ComboBox

    Quote Originally Posted by iMrTidy View Post
    Here is an example with formulas and data validation. It will be much more powerful with VBA but I do not have time to write the whole code for you.
    Ok, so I figured out the code, and can even replicate it, which is great. I'm still trying to figure out how to include the secondary category as well.

    Can I change the range somewhere in the code to account for the Secondary Category column, as well as change how the countifs function works?

  6. #6
    Registered User
    Join Date
    04-29-2012
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Dynamic Data Validation List or ComboBox

    Hello,

    Briefly, I created some support data in 'Lists'. For the first, to get what 'Times' is chosen I used formula in G1. Then I defined each time in numbers (min and max G1:H6) since 'Recipe Database - Total time' is a number. Then I applied combination of formulas to get items from 'Recipe Database - Receipe Name' one by one. The core part is SUMPRODUCT which takes a range and limits it by given conditions and return only those row's numbers which satisfy all the conditions. LARGE and COUNTIFS are used to find where to start since those rows which do not satisfy result in zero. The rest should be easy to undertand.

+ 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 Data Validation List - 2 criteria
    By smartbuyer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2018, 05:14 AM
  2. [SOLVED] How do I change properties of activex combobox that is linked data validation list?
    By Chris* in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-13-2014, 07:03 AM
  3. [SOLVED] Dynamic list connect to validation data
    By pedjvak in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-09-2013, 04:51 AM
  4. How to fill an activex combobox with a data validation list?
    By Sape in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2013, 04:45 PM
  5. [SOLVED] Dynamic Conditional Data Validation List
    By rackman70 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-13-2012, 11:14 AM
  6. Data Validation with Dynamic List using VBA
    By nivassrii in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2011, 01:13 AM
  7. ComboBox in a Data Validation List...
    By Bob Barnes in forum Excel General
    Replies: 3
    Last Post: 01-06-2006, 07:10 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