+ Reply to Thread
Results 1 to 4 of 4

Creating automatic/dynamic drop down lists from a table with multiple variables

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    26

    Creating automatic/dynamic drop down lists from a table with multiple variables

    sample.xlsx

    Dear All,
    I’m going to try and explain as best I can the two issues I’m currently having.
    I have attached a sample workbook to explain.
    I have a large database from which I have currently created dropdown lists manually. However, this is not ideal because I have to update my database regularly and some lines might disappear/appear, which can create issues with regards to the already created manual drop down lists. (time consuming to update the dropdown menus, additionally I have to put the data in the right order before I can start created dropdown menus…).Therefore, I would like the drop down menus to be updated, through VBA, when new data is integrated by looking at the content of column B. In other words, if a cell in column B is equal to a particular word, then the content of the cell in column A needs to be included in the dropdown list, for which a name shall be allocated.
    Once the dropdown menus have successfully been created, dependent dropdown menus will be created like shown in the sample workbook.
    The second query is more or less the same, but now in a different order. So by selecting a “zzz” you should get a dependent drop down menu “yyy” which would give you a further dependent drop down menu with “xxx”.
    I don’t know whether my explanations are clear in any way but any help would be greatly appreciated!
    Thanks !

  2. #2
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Creating automatic/dynamic drop down lists from a table with multiple variables

    Quote Originally Posted by bobby.bobby View Post
    Attachment 226424
    In other words, if a cell in column B is equal to a particular word, then the content of the cell in column A needs to be included in the dropdown list, for which a name shall be allocated.
    Question:
    So if a cell in column b is not equal to a particular word, then you DON'T want the content of the cell in column A to be included in the dropdown list?
    If I have helped, Don't forget to add to my reputation (click on the star icon below the post).
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved).
    Use code tags when posting your code.

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Creating automatic/dynamic drop down lists from a table with multiple variables

    Yes that's correct !

  4. #4
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Creating automatic/dynamic drop down lists from a table with multiple variables

    Ok then.
    First of all, it is very good that you have chosen to name the ranges, that contain the validation list; this is the key to the solution with VBA.
    So now, I think the only thing you need to do with VBA is to insert or delete cells from these lists, according to the criteria you specify.
    This can be done by a code using the insert, find, and delete methods (as they apply to the range object).

    If you get stuck in a particular point, please tell, I'll be happy to help; but I can't write the whole code from scratch.

    Cheers,

+ 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