+ Reply to Thread
Results 1 to 4 of 4

worksheetfunction.vlookup returning run-time error (1004)

  1. #1
    Registered User
    Join Date
    11-13-2010
    Location
    Springfield, IL
    MS-Off Ver
    Excel 2007
    Posts
    36

    worksheetfunction.vlookup returning run-time error (1004)

    In 10 minutes of searching the forums, I didn't find an answer to this question:

    Please Login or Register  to view this content.
    When I run this code, I get an error message, "Unable to get the VLookup property of the WorksheetFunction class". I know the individual arguments in that vlookup code are all correct; I can manipulate them each individually in the sub routine. Why can't excel find the Vlookup property (and why does it think its a property, not a method)?

    thank you!
    Last edited by Mervil; 11-19-2010 at 01:23 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: worksheetfunction.vlookup returning run-time error (1004)

    Hi Mervil,

    Try just "Application.Vlookup" instead of "Application.WorksheetFunction.Vlookup"

  3. #3
    Registered User
    Join Date
    11-13-2010
    Location
    Springfield, IL
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: worksheetfunction.vlookup returning run-time error (1004)

    Ok. What the heck. That worked! But WHY did that work? I thought vlookup was a worksheetfunction.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: worksheetfunction.vlookup returning run-time error (1004)

    I think it technically is part of WorksheetFunction, but doesn't work when that is added to the code. ::shrug::

    Just something I've come across when trying myself.

+ 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