+ Reply to Thread
Results 1 to 6 of 6

Variable Dependent Drop Downs

  1. #1
    Registered User
    Join Date
    10-08-2014
    Location
    austin, texas
    MS-Off Ver
    2007
    Posts
    3

    Variable Dependent Drop Downs

    I'm a bit of a novice at excel. Maybe an advanced novice. I've got most of the basics down and maybe a few semi-advanced things but seems I'm barely scratching the surface. I've done some drop down lists and used Hlookup and Vlookup on a few things so I can muddle my way thru a bit. I'm working on a little project where I want to have different sections that I want each section to have a drop down list at the top and then, depending on what selection is made at the top, I can have drop down list below that pertain to that selection. In the attached worksheet I have a layout on sheet 1 and have added drop down lists that sort of work on a limited bases. Sheet 2 is the range. I use Hlookup just to get something going but I'm probably using the wrong formula. Maybe Vlookup? Or something else. I know nothing about VBA. I've pretty much learned anything I know by trial and much error and scouring the internet. I'll keep working with this but thought I'd throw it out there to someone smarter than me and maybe I could cut down some time.

    thanks
    mike
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Variable Dependent Drop Downs

    Scouring the internet and problem solving IS the only way to learn this stuff So, you didnt include the layout of all of your data, but I would use a pivot table instead of a lookup and an iferror or an offset function.

    Do you happen to have an example that includes the data layout for ALL of the things you are wanting to populate for this report?
    So QTY, Unit Price, and Description?

    Also, will the number of items in each category be variable, as in some categories have more or less?

    I can show you how I would lay it out if it were given to me in that manner
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Variable Dependent Drop Downs

    I forgot to attach what I was talking about with a pivot table.

    DependentDropListTest.xlsx

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Variable Dependent Drop Downs

    I have added a bunch of named ranges in your WB.

    To use dependant dropdowns, you need to have range names for all your data ranges, and then the DD references the 2nd and subsequent levels using an INDIRECT() reference to level 1 (for level 2) and to level 3 (for level 2)

    You did not really have a level 3 set up, so I kinda dummied 1 up in column J to show you how to apply it. To see how it works, look at "Source" in teh DV window. I had to use the SUBSTITUTE() function to swap a space with a _ because DV named ranges doesnt like to work with spaces
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    10-08-2014
    Location
    austin, texas
    MS-Off Ver
    2007
    Posts
    3

    Re: Variable Dependent Drop Downs

    Thanks for the reply. I'm not familiar at all with pivot tables but I've seen them mentioned quite a bit. Just haven't had the time to learn about them. I'm not sure if the first worksheet I attached had all the drop downs I wanted so I added them and attached again. This is the way I want it to work. It kind of works but not really. Probably not the right way about it. In sheet 1 I have the drop downs for the different categories working fine. But using Hlookup on the second sheet in row I, I have I1 dependent on sheet 1 A5. If I change sheet 1, A5 to a different category then it correctly gives the proper drop down lists below. However, the other sections further down also reference those items connected to the category selected in A5. Example is if you select Category 2 in sheet 1, A5 you will get the proper drop down lists of Category 2 items. But if you select Category 4 in sheet 1, A24 you will also get the category items for Category 2 since sheet 2, I1 is referencing the specific cell A5 in sheet 1.
    Sorry so long and hope I didn't confuse. It's hard to explain when you don't know what you're doing!

    thanks again
    mike
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-08-2014
    Location
    austin, texas
    MS-Off Ver
    2007
    Posts
    3

    Re: Variable Dependent Drop Downs

    I'll work on this and see if I can figure it out. I've named the category items Cat 1 Item 1 and so on, only to reference them to Category 1 and same with Category 2, etc. My final project will have names for the categories and probably a 2 or 3 work for items. Each category will have different items as well as different number of items to select from. But if I select Category 2 I want only the items associated with category 2 to be in the drop down list below. Same with category 5, the drop down lists will only have category 5 selection in the drop down lists.

    thanks
    mike

+ 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. [SOLVED] Dependent Drop-Downs (Indexed)
    By BobBing in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2012, 05:33 PM
  2. [SOLVED] How to Reset Dependent drop downs
    By ertweety in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2012, 06:10 PM
  3. Creating dependent drop downs
    By harrybelly in forum Excel General
    Replies: 2
    Last Post: 12-08-2011, 05:08 PM
  4. Dependent Drop-Downs
    By braydon16 in forum Excel General
    Replies: 2
    Last Post: 12-08-2011, 05:06 PM
  5. Dependent drop downs.
    By Mattypb in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-16-2009, 08:47 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