+ Reply to Thread
Results 1 to 4 of 4

Dynamic Vlookup with INDIRECT() across multiple sheets

  1. #1
    Registered User
    Join Date
    12-04-2018
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    28

    Dynamic Vlookup with INDIRECT() across multiple sheets

    Hello all,

    Trying to get the INDIRECT function to work as intended. I think it should be doable. What I am trying to do is setup the value for "Qty" in "Dashboard" for Cat 1 - 5 based on the drop down selection in C1 And F1.

    Where Person A Period 1 the cat's are as follows:
    124
    49
    44
    149
    37

    So if that is selected I am expecting to see these values populate in the dashboard and so on, based on the person / period of your selection. Any guidance is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Dynamic Vlookup with INDIRECT() across multiple sheets

    In B4:
    =IFERROR(VLOOKUP($C$1,INDIRECT("'"&$E$1&" "&$F$1&"'!A2:F5"),MATCH(A4,INDIRECT("'"&$E$1&" "&$F$1&"'!A1:F1"),0),FALSE),"")

    Copy down.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    05-11-2018
    Location
    Dallas, TX
    MS-Off Ver
    2013
    Posts
    5

    Re: Dynamic Vlookup with INDIRECT() across multiple sheets

    CK's answer solves your problem, but I thought I'd help with why what you had in your sheet wasn't working.

    Your formula in B4 is this:

    =IFERROR(VLOOKUP(A4,INDIRECT("'"&G$1&"'!B4:B8"),0,FALSE),"")

    There are a few problems here.

    VLOOKUP matches your value (in this case A4) by looking vertically down the first colum in your array. In this case B4:B8 doesn't work because all those values are in a row. To use VLOOKUP you need your lookup values to be in a column. That's not quite enough here because you also need to grab the right column. That's why CK combined Vlookup and Match, Match will pass the correct column number.

    Your INDIRECT statement is pointing to $G$1, but your data actually lives in $F$1. In addition, your tabs are named "Period X", so you need to pass the word "Period" to your indirect statement as well, either by grabbing both E1 and F1 or by just putting the word "Period" in your concatenation.

    Hope that helps

  4. #4
    Registered User
    Join Date
    12-04-2018
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    28

    Re: Dynamic Vlookup with INDIRECT() across multiple sheets

    Thanks for the detailed response!

    So I get the F1 versus G1. However why also include the A2:F5? Is that pointing to the max size array of the tables in the tabs? So in turn the section for indirect at the match for A1:F1 is checking the the 'Cat 1", 'Cat 2', etc in the header to get the value?

+ 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. Replies: 4
    Last Post: 09-28-2016, 08:35 PM
  2. Dynamic References Based on Two Criteria (INDIRECT OR VLOOKUP?)
    By hotelguy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-08-2015, 09:52 PM
  3. How to create a dynamic sum calculation over multiple sheets using INDIRECT?
    By The_Snook in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2015, 11:06 AM
  4. [SOLVED] INDIRECT Function with multiple sheets - SUMIF, INDIRECT & MATCH
    By DJDRU in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2014, 08:42 AM
  5. [SOLVED] Issues with VLOOKUP/INDIRECT and retrieving from multiple sheets
    By nicolerork in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-28-2013, 12:53 AM
  6. Dynamic INDIRECT VLOOKUP accross multiple sheets
    By johnmitch38 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-02-2013, 06:57 AM
  7. [SOLVED] Dynamic VLOOKUP wit INDIRECT reference
    By supern0va in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-29-2012, 11:44 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