+ Reply to Thread
Results 1 to 18 of 18

Vlookup+Dropdown

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Vlookup+Dropdown

    Hello.
    I need to program my project in such way, that when value of a specific sell changes other sells would change their drop down lists according to VLOOKUP.
    There are different items which are under same categories and this is why drop down list is needed
    I know how to create VLOOKUP function and how to make cells automatically change their drop down lists, but I am struggling combining then together.

    Best regards, Vlad
    Last edited by beseda2004; 11-30-2011 at 03:19 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Vlookup+Dropdown

    Hi Vlad,

    Not quite sure I understand the make-up of your criteria here and what would be the best solution.

    Could this be somewhere in the ballpark?

    http://www.contextures.com/xldataval02.html

    If not, can you give a sample of what you have and what you desire?
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Vlookup+Dropdown

    Let me try work it out myself. Is it possible to put =VLOOKUP() formula into the Data Validation (List)?
    If so, what should be different to the normal vlookup (e.g. to the one I would put into cell)
    Vlad

  4. #4
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    Upload a sample please, it'll take out a lot of gueeswork on the forums part. Uoi could reference using the indirect function a drop down range and include that in a vlookup, but there's possibly better solutions if we know what you're trying tp do
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Vlookup+Dropdown

    I've never seen a vlookup used in data validation, but that doesn't mean it can't.

    A vlookup normally returns one result so why the need for data validation for one result.

    I'm afraid we'll need more information than what you have provided.

    A sample workbook always helps with data setup reflecting your actual setup and with what you expect.

  6. #6
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Vlookup+Dropdown

    Ok, this is kind of what I want to find out.
    Vlad
    Attached Files Attached Files

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Vlookup+Dropdown

    I fixed your attachment to use Indirect in the data validation for I11 and then created named ranges for B1:D4.

    The named ranges are titled in B1:D1 which will match what you select in G11 and therefore I11 returns only those side dishes.

    Take a look at the link I attached which explains this method.
    Attached Files Attached Files
    Last edited by jeffreybrown; 11-28-2011 at 04:57 PM.

  8. #8
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Vlookup+Dropdown

    Oh god, sorry for that, its a wrong question, i found answer for it which is overcomplicated thou, using macros. So your version will also help a lot, thank you for that.

    The proper question is here
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    Is it imperative that the item and colour are in seperate cells?

  10. #10
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Vlookup+Dropdown

    no, colour is just for indication

  11. #11
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Vlookup+Dropdown

    beseda2004,

    Attached is a modified version of your 'question lookup+validation' workbook. I reformatted how the information was stored to make life a little easier for Excel, and then used a lot of Named Ranges to reference the information. I made Sheet2 the 'Lists' worksheet. Column A is Empty (more on that below when I explain the named ranges) and Column B is Section (the unique list of Sections extracted from the data table, namely NAVY, ARMY, and RAF).

    Here's the formula for 'Lists' column B (note that this is an array formula and thus requires that it be entered with Ctrl+Shift+Enter and not just Enter):
    Please Login or Register  to view this content.


    The named ranges are set up dynamically so that as information is added and removed, the drop-down lists will auto-update. Here are the different named range formulas:
    • Empty (this named range is so that the drop-down list can be empty if a Section has not been selected:
      Please Login or Register  to view this content.

    • rngTable (the table of data for the section, clothing types, color, and price):
      Please Login or Register  to view this content.

    • Section (the unique list of Sections extracted from rngTable):
      Please Login or Register  to view this content.

    • Start (Used for the data validation offset formulas to dive into and extract information from rngTable):
      Please Login or Register  to view this content.

    The data validation formula for the drop-down lists is the following:
    Please Login or Register  to view this content.


    The Price formula is a SumIfs:
    Please Login or Register  to view this content.



    It all looks pretty scary, I know. Its not exactly a beginner's formula, but it gets the job done quite well with no VBA.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  12. #12
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    This isn't too formula heavy. I've made a mash up from your tables, made a few named ranges and used the indirect function. If your original data needs to be seperated into columns like you had, then i suggest you copy the formula in the tables i've created below the ones you've set up
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Vlookup+Dropdown

    2 tigeravatar, I am afraid your drop downs don't work. I will go through the code when I will wake up, thank you for help.
    2scottylad2, your formula seems to be working, thou it always gives the whole list of items on a drop down, rather than limited by cathegory

  14. #14
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    It's the only way to do it that I know that avoids having a lot of offset formulas

  15. #15
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    Heres another stab at your sheet. The table I'm referencing, you can either type your data as such, or use a formula to extract same from your data. I've moved your current setup down the page a bit, not required if you can make a table like the one i have. Again, it's a few named ranges using the offset and match, then referenced by vlookup using an indirect function. At each change in service, you will need to reselect accordingly.

    hope this helps
    Attached Files Attached Files

  16. #16
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    Slight error with last sheet, named ranges are referencing a rance i've since deleted. This sheets fixed
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    11-03-2011
    Location
    Holt
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Vlookup+Dropdown

    Thanks for help guys.
    How do we close that thread?

  18. #18
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Vlookup+Dropdown

    Go to your original post, click edit and select Solved. Which solution worked for you?

+ 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