+ Reply to Thread
Results 1 to 4 of 4

How to insert a selction from a drop down list into a table array in a vlookup formula

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    2

    How to insert a selction from a drop down list into a table array in a vlookup formula

    This is my first post so Im not exactly sure how this works. Here are the details and the issues that Im having.

    I have a workbook with a tab for every week of the year. Each tab is identical and has inside sales dollars and sales mix % specifics for multiple subdepartments by day. I have one worksheet that pulls the average sales/sales mix of each subdepartment for each day. Lastly, I have a worksheet that is intended to compare the average vs. a partilcuar week of my choosing.

    The issues I am having is with the last worksheet. In this worksheet I have two drop down lists. One where I select the subdepartment and one where I select the week. The control week is from the "Averages" sheet so I used a vlookup to pull that info and its working great. The successful formula, located on the "Trends" worksheeet looks like this... =VLOOKUP($A$2,Averages!$A$3:$Q$40,2,FALSE) where A2 is the drop down list of sub departments. The compare section is where Im having the issue. I would like to be able to select a date from the second drop down list, located at C2, and have it automatically insert that selection to generate the sales and mix for that specific date. Ideally the formula would generate as =VLOOKUP($A$2,C2!$A$3:$Q$40,2,FALSE) but without me having to change it personally to this set up. As noted C2 would be the drop list of each different week (worksheet) that is avaialbe. I have looked many forums and searches and have yet been able to find a set up that works.

    If there are any other specifics that are needed to answer please let me know. I appreacte anyones help.

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to insert a selction from a drop down list into a table array in a vlookup formula

    You can use the INDIRECT() function to pieces strings together to create a usable sheet/range reference.

    =VLOOKUP($A$2, INDIRECT("'" & C2 & "'!$A$3:$Q$40"), 2, 0)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-26-2012
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: How to insert a selction from a drop down list into a table array in a vlookup formula

    I appreciate your help, it worked perfectly!

  4. #4
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to insert a selction from a drop down list into a table array in a vlookup formula

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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