+ Reply to Thread
Results 1 to 3 of 3

Create common dropdown lists across multiple workbooks

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    Post Create common dropdown lists across multiple workbooks

    Hello -

    I expect to deploy over 200 iterations of a workbook (templates if you will) containing a mix of up to one hundred different attributes each with its own list of valid values. My problem is the attributes don't always default to the same column in every template workbook. Therefore, to make things easier for users I would like to create attribute valid value dropdown lists on the fly using the "Valid Values' table as the source data (see the attached). Since the attribute names will be the same from one template workbook to the next, I wanted to come up with a macro that would reference a source table (a separate workbook) containing all valid values for all attributes which users would be required to download to their local machine.

    See the attached example workbooks and an example of a "Valid Values" list. Here's what needs to happen: When a user opens template workbook #1 I need drop down lists containing the valid values for the attributes contained in cell B3 (User Code),C3 (Department) and D3 (Category). Likewise, when another user opens template workbook #2, I need drop down lists containing the valid values in cell B2 (Department), C3 (Group), D3 (Category), E3 (Level), F3 (Material) and G3 (User Code). Notice that "Department", "Category" and "User Code" are data elements common between both workbooks but resident in different columns. Hope these examples help you understand my needs.

    Thanks for any help offered!

    Grilleman
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Create common dropdown lists across multiple workbooks

    Hello Grilleman,

    Since the Data Validation List can not be shared between workbooks, it is necessary to use a macro to read the lists in "Valid Values". The macro shown assumes all the files are located in the same folder. If they are not then the macro variable SrcWkb will need to be changed to match the full path of the workbook "Valid Values".

    This macro can be copied into the ThisWorkbook module in each of the template workbooks. When the workbook is opened, the drop downs are created on the sheet using the data in "Valid Values". "Valid Values" does not need to be open for the macro to work.

    Create Data Validation Dropdowns Macro
    Please Login or Register  to view this content.
    How to Paste a Macro into ThisWorkbook
    1. Copy the macro with Ctrl+C.
    2. Open the workbook and use Alt+F11 to open the VB Editor.
    3. In the Project window, Double Click ThisWorkbook
    4. Paste the macro into the module with Ctrl+V.
    5. Save the macro using Ctrl+S
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    Re: Create common dropdown lists across multiple workbooks

    Thanks Leith. This works for me.

+ 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. Dropdown lists - multiple
    By lrussell490 in forum Access Tables & Databases
    Replies: 2
    Last Post: 09-10-2013, 03:04 PM
  2. Multiple Dropdown lists
    By lrussell490 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-10-2013, 09:18 AM
  3. How do I create dynamic dropdown lists...
    By Technical_13 in forum Excel General
    Replies: 2
    Last Post: 01-06-2013, 06:45 PM
  4. Combine Multiple workbooks based on a common column
    By vioStyle in forum Excel General
    Replies: 6
    Last Post: 06-14-2012, 06:44 AM
  5. Replies: 2
    Last Post: 09-19-2005, 02:05 AM

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