+ Reply to Thread
Results 1 to 6 of 6

Worksheet Functions in vba

  1. #1
    Registered User
    Join Date
    08-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    27

    Worksheet Functions in vba

    I am using the following statement

    Please Login or Register  to view this content.

    can you please whether this is legal... my vba compiler is crashing when i am trying this

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Worksheet Functions in vba

    Assuming i,j & range1 are all valid then perhaps:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Worksheet Functions in vba

    There's nothing wrong with the syntax itself, assuming the sheets exist and the variables are correct.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    08-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Worksheet Functions in vba

    How come then i am getting the following error

    unable to get vlookup property of worksheetfunction class

  5. #5
    Registered User
    Join Date
    08-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Worksheet Functions in vba

    @DonkeyoTe..

    Thanks for the tip..

    works like a charm

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Worksheet Functions in vba

    I thought you were getting a compile error, not a runtime one. The issue, as solved by DO, is that the WorksheetFunction.VLookup returns a runtime error, not an error value, if the value is not found in the table. Using Application.Vlookup returns an error value instead.

+ 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