+ Reply to Thread
Results 1 to 6 of 6

Triggering Different Dropdowns Based on Original Dropdown

  1. #1
    Registered User
    Join Date
    05-12-2009
    Location
    Kingston, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Triggering Different Dropdowns Based on Original Dropdown

    Hi all,

    Ok, so here is my problem. I have several different categories of data, with each list named after the full category title. The data is stored on another worksheet. On the worksheet that will be interacted with, there is a dropdown menu that allows you to choose which category of data you want. I am trying to get a macro that produces a dropdown menu the next column over of all the items in that category. Here is the code that I have so far.

    Please Login or Register  to view this content.
    'cat' is the cell that contains the name of the cell range that has all the data that I want in the dropdown menu. I know the problem lies in the red highlighted portion of the code. I can't get the Formula1 to accept the value of 'cat' as a named cell range. Any help would be greatly appreciated.
    Last edited by Ziilch; 05-14-2009 at 08:14 AM.

  2. #2
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    2003 & 2010
    Posts
    186

    Re: Triggering Different Dropdowns Based on Original Dropdown

    Hi Ziilch,
    You have to enter the cell name as a string. In other words, you have to write "cat" instead of cat. In your particular case, you'll need to use double "" at the begining and at the end of ca;, so that it prints the " symbol instead of closing the String statement opened with "=ActiveWork......".

    Hope it works.


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-12-2009
    Location
    Kingston, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Triggering Different Dropdowns Based on Original Dropdown

    Hey Wizz,

    Ok, so I tried that and it didn't work. I think the problem is that your code expects a range named 'cat', whereas my intent is to define a variable named 'cat' in the code that contains the name of the named range. I think with what I want the quotes in the Formula1 definition will all be removed, I just don't know what to put in after. Is there anything else you can think of?

    Thanks

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Triggering Different Dropdowns Based on Original Dropdown

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    2003 & 2010
    Posts
    186

    Re: Triggering Different Dropdowns Based on Original Dropdown

    My bad;
    Try this one:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-12-2009
    Location
    Kingston, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Triggering Different Dropdowns Based on Original Dropdown

    Awesome, that worked. Thanks so much.

+ 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