+ Reply to Thread
Results 1 to 2 of 2

using indirect in vlookup to insert search range

  1. #1
    Registered User
    Join Date
    02-28-2011
    Location
    dallas,texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    using indirect in vlookup to insert search range

    I have a range ['[Aspect Inbound Stats (All).xlsx]BE Hourly'!$A:$ah . I have this value in a cell (cell O9).

    I want to use this range in a vlookup. the tab (BE Hourly) will change with each row to whatever is on the new row- but sheet name and column references stays the same. however this will change values as I move through the sheet so need to reference the cell or somehow just indirect the concatenate of the reference.

    I have tried indirect function but get "variable" and it does not seem to reference it. I have the sheet is referencing open already so that is not the issue.


    I have tried the following with no luck
    VLOOKUP(B30,INDIRECT(CONCATENATE("'[Aspect Inbound Stats (All).xlsx]",D30,"'!$A:$ah")),4,FALSE)
    VLOOKUP(B30,INDIRECT(O9),4,FALSE)
    VLOOKUP(B30,O9,4,FALSE)

    I feel like I am missing something simple

    this formula will be put in the cell by VBA, so if there is a better option through vba I am open to it
    Last edited by smakatura; 04-16-2019 at 09:31 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: using indirect in vlookup to insert search range

    Should it be this, single quote after the filename?

    VLOOKUP(B30,INDIRECT(CONCATENATE("'[Aspect Inbound Stats (All).xlsx]'",D30,"!$A:$AH")),4,FALSE)

    or


    VLOOKUP(B30,INDIRECT("'[Aspect Inbound Stats (All).xlsx]'"&D30&"!$A:$AH")),4,FALSE)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

+ 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] Keeping cell range locked during Vlookup? Indirect function?
    By iracknback in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-10-2014, 05:42 PM
  2. Vlookup with a option to insert search criteria required
    By Lowtech in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2014, 02:43 PM
  3. [SOLVED] Vlookup/Indirect Formula Not Finding Range
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2013, 04:15 PM
  4. Search Range and Insert Value
    By amonty78 in forum Excel General
    Replies: 2
    Last Post: 09-12-2011, 08:18 AM
  5. Vlookup with Indirect and Named Range
    By todd1016 in forum Excel General
    Replies: 3
    Last Post: 02-20-2011, 11:45 AM
  6. INDIRECT.EXT to build a range in VLOOKUP
    By Jufa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-30-2008, 03:07 PM
  7. Insert Vlookup into table_array of Vlookup with named range
    By Denise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2005, 07:06 PM

Tags for this Thread

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