+ Reply to Thread
Results 1 to 5 of 5

worksheetfunction.vlookup not working as expected.

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    worksheetfunction.vlookup not working as expected.

    so i have the following code:

    Please Login or Register  to view this content.
    when i run it, i get a runtime error 1004 - Unable to get the vlookup property of the worksheetfuncion class on this line:

    Please Login or Register  to view this content.
    it correctly prints the range address in the immediate window

    what am i doing wrong?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,373

    Re: worksheetfunction.vlookup not working as expected.

    Please heed the yellow banner at the top of the page.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: worksheetfunction.vlookup not working as expected.

    tms, not sure if i can upload the addin as it is very big. and the workbook with the code in it contains confidential information. what can i do in a case like mine where uploading is not suggested?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: worksheetfunction.vlookup not working as expected.

    Chances are it can't find the the value of "i" in the lookup table.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,813

    Re: worksheetfunction.vlookup not working as expected.

    With an exact match lookup like this, that error usually means that the lookup value (i in this case) does not exactly match any entry in the leftmost column of the lookup range (The "vendnamnum" named range). I would be looking at what is in i, and what is in the leftmost column of vendnamnum and try to see why i is not being found.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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] application.worksheetfunction.vlookup not working
    By dummy777 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2020, 01:52 AM
  2. [SOLVED] VBA for Application.Worksheetfunction.Vlookup not working
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-01-2017, 02:43 PM
  3. [SOLVED] VBA for Application.Worksheetfunction.Vlookup not working
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-01-2017, 02:03 PM
  4. [SOLVED] vlookup not working as expected
    By dmcgov in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-12-2016, 11:54 AM
  5. [SOLVED] VLOOKUP not working as expected.
    By mithandir1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-17-2014, 06:44 PM
  6. vlookup/if formula not working as expected
    By Shocked in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2008, 10:06 AM
  7. vlookup worksheetfunction call from VBA not working
    By Conor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2006, 11:35 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