+ Reply to Thread
Results 1 to 9 of 9

dynamic vlookup using variable

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    dynamic vlookup using variable

    I am trying to create a dynamic vlookup that passes a variable as the table_array(2nd parameter). I then try to assign the vlookup to a Range Formula. I get an application-defined or object-defined error


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: dynamic vlookup using variable

    hi gammaman, a couple of thoughts:

    1. LookUp A:Z columns is pretty tough thing: 1000 000 rows x 26 = 26 000 000 cells! Why not to find data bottom row within the code and make the range for the formula more precise?
    2. What is this supposed to mean: '11-01-13'!$A$A

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: dynamic vlookup using variable

    To answer question 2, '11-01-13'!$A$A is the first sheet in the workbook. This vlookup forumula is on sheet 3. So basically I need to lookup something in column A:A from the first sheet (11-01-13) and then find the match in variable fileLookup which points to an outside workbook.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: dynamic vlookup using variable

    Sheet name: '11-01-13'
    Range syntax is incorrect: $A$A

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: dynamic vlookup using variable

    Sorry, I do not understand what you are trying to say.

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: dynamic vlookup using variable

    So it is somewhat working now. The formula is being inserted into the cell, but it is appearing as VLOOKUP('Sheet1'!A:A,file1Lookup,2)

    It should have the actual file path in place of file1Lookup.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: dynamic vlookup using variable

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: dynamic vlookup using variable

    Works Great. Thanks for your help

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: dynamic vlookup using variable

    please mark the thread as Solved if we are done

+ 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. vlookup variable filepath one file variable can this be done via a function?
    By pauldbaker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-15-2013, 10:10 AM
  2. vlookup with variable range and variable array size
    By chaslie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2013, 02:37 PM
  3. Dynamic or Variable Lookup array in INDEX, MATCH or VLOOKUP
    By kishor_c in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2012, 09:46 AM
  4. Dynamic Variable identification
    By Armado159 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2012, 04:27 PM
  5. Variable File Reference and Variable Table Array in VBA VLOOKUP
    By Gingeiko in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2011, 11:08 PM

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