+ Reply to Thread
Results 1 to 12 of 12

Dependent list from drop menus

  1. #1
    Registered User
    Join Date
    05-17-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Dependent list from drop menus

    Hey Everyone,

    I have an issue with what function to use and how to go about doing it.

    my situation is this:

    I have one drop down box for the models numbers named "models"
    I also have another drop down box for the sizes named "sizes"
    and i have a third box for the price.

    Dependent on what "Models" and what "sizes" the users choose will determain the price.

    is there a way to make this happen. i have over 15 models and 6 sizes with a variety of 6 prices.

    I was planning on doing an IF statement 6 times per model but that would mean each cell box is rather full up.
    i am thinking that there much be an easier way but i dont know how?

    if anyone can help, it would be greatly appreciated.
    Last edited by SNL888; 05-17-2011 at 08:56 AM.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Confused!!!!!!!

    Hi,
    Can you post an example workbook?

    Is there any correlation between the different prizes as to det choices made.

    Example:

    size 1 red square = 100 $

    size 1½ red square = 1½ * size1

    Steffen Thomsen.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Confused!!!!!!!

    hi Steffen Thomsen

    Your post does not comply with Rule 7 of our Forum RULES:

    7. Don't ignore requests by Administrators, Moderators, or senior members of the forum. If you are unclear about their request or instructions, then send a private message to them asking for help. Do not post a reply in a thread where such a request (e.g., title change, code tags) is pending.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Dependent list from drop menus

    Check this link: http://www.contextures.com/xldataval02.html

    is this what you looking for?

  5. #5
    Registered User
    Join Date
    05-17-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Dependent list from drop menus

    not really but sort off. In the example you provided, if you select the "category" fruit then the "items" change to fruit.

    what i am aiming to do is have a drop down list containing a "catagory" (ie fruit) another drop down list contacting the "sizes" (ie Weight - 1KG, 2KG etc etc) and then the price.

    so if i choose from the "catagory" fruit, then from the "Sizes" the price will automatically appear.

    eg
    Select "apple", select "1kg" = 2.50 and so on and so on

    im not sure if i am making any sense!!!!

    i was thinking something like: IF Catagory is XYZ and Size is XYZ then price = XYZ
    Last edited by SNL888; 05-17-2011 at 09:51 AM.

  6. #6
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Dependent list from drop menus

    Hi,

    Can you post an example workbook with what code you have, and the different prizes?

    Steffen Thomsen

  7. #7
    Registered User
    Join Date
    05-17-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Dependent list from drop menus

    I have attached an example.xls workbook as requested.

    I am sooooo confused about what sort of calculations or formulas I need that I dont know where to start.

    my dream would be to be able to choose a model number + size and the price would automatically appear in the price column. the prices would be taken from the columns (J-L) and they are coloured coded.
    once this is done, then its price x Quantity = total.
    Discount would then be 2% between 50-100 quantity's
    4% 100-200, 6% 300-400 etc etc.

    if anyone has any advise or good resources on how to do this, it would be greatly appreciated.

    thank you for all your assistance so far.
    Attached Files Attached Files

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Dependent list from drop menus

    Can you give us some further explanation:

    For example, blue values.

    You have:
    Models TWS-6 to 10 (5 models)
    Sizes (6 sizes)
    Prices (6 prices)

    How are models connected with Sizes?

    What if I take TW-9 and 32 GB?
    What if I take TW-10 and 32 GB?
    Last edited by zbor; 05-17-2011 at 01:08 PM.

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Dependent list from drop menus

    Hi SNL888

    In the attached, I've defined named ranges for the first 6 items. See if this is doing as you require. If it is, see if you can set up the additional named ranges. Notice the use of Indirect in the Data Validation.

    If this is working for you and you need additional help, let me know.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  10. #10
    Registered User
    Join Date
    05-17-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Dependent list from drop menus

    Quote Originally Posted by jaslake View Post
    Hi SNL888

    In the attached, I've defined named ranges for the first 6 items. See if this is doing as you require. If it is, see if you can set up the additional named ranges. Notice the use of Indirect in the Data Validation.

    If this is working for you and you need additional help, let me know.
    That spreadsheet is exactly what I want , im going to save two versions now, one i can refer to and another i can try to complete. i have been looking at the spread sheet for about 10 mins and i am still lost, have no idea what indirect in the data validation does but thats what google is for

    i do have one question, why are there so many named fields?

    i have just checked the Models in "name Manager" and that forumal made me look like this guy

    im going to try and tackle/understand what is going on but i really appreciate what you all have done.

  11. #11
    Registered User
    Join Date
    05-17-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Dependent list from drop menus

    Jaslake,

    is there any chance you might be able to explain these formula to me:

    =OFFSET(Sheet3!$A$3,0,0,(COUNTA(Sheet3!$A:$A)-2),1)

    =OFFSET(INDIRECT($A6),0,0,COUNTA(INDIRECT(A6&"Col")),1)

    i got no idea what is going on here or how it works.

    If i know this, i might be able to complete the rest of the form.

    Thanks for all your help so far.
    Last edited by SNL888; 05-18-2011 at 12:24 PM.

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Dependent list from drop menus

    Hi SNL888

    I'll try.

    =OFFSET(Sheet3!$A$3,0,0,(COUNTA(Sheet3!$A:$A)-2),1)
    Creates a dynamic (as you add items, they're automatically added) named range consisting of all items in Sheet3, Column A, starting in Cell A3. Do some research on Dynamic Named ranges for further explanation. Here's a good place to start http://www.ozgrid.com/Excel/DynamicRanges.htm

    =OFFSET(INDIRECT($A6),0,0,COUNTA(INDIRECT(A6&"Col")),1)
    This sets the source of Data Validation list in B6.
    It says look for a range named as the value of cell A6&"Col" such that if A6 contains TWS_04, the code looks for a named range called TWS_04Col and fills the Data Validation list with that named range. Do some research on the Indirect Function for further explanation. Here's a good primer http://www.cpearson.com/excel/indirect.htm

    As you begin to understand how these functions work, you'll understand this
    Please Login or Register  to view this content.

+ 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