+ Reply to Thread
Results 1 to 4 of 4

Unable to get the Vlookup Property .... class - Issue with Character / Numeric comparison

  1. #1
    Forum Contributor
    Join Date
    02-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    102

    Unable to get the Vlookup Property .... class - Issue with Character / Numeric comparison

    Hello,

    The below function works perfectly sometimes but otherwise it gives a error message "Unable to get the Vlookup Property of the worksheetfunction class"

    i could understand the cause of the problem but not sure how can this be resolved. The problem is with the dataset i paste on the "Rollnumber" Sheet. The issue is
    1. The range can either have a numeric (1123) value or begin with Character like - "B1134"
    2. And, similarly the string to be searched can also be either ways. It can be the number 1123 or it can be of character type "1123"

    Not sure if i had defined the issue correctly. Apologize if this is confusing. Bottomline is the LookupValue and LookupRange can either be numeric / alpha numeric or it can look like numeric for our eyes but can be a character from excel/vba point of view.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Unable to get the Vlookup Property .... class - Issue with Character / Numeric compari

    This will make the lookup value always a string. Is that what you want?

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    02-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Unable to get the Vlookup Property .... class - Issue with Character / Numeric compari

    Thanks. But still the same result... The issue is the Lookuprange can have numeric value. For instance Lookupvalue can have 123 and lookuprange can have "123" ( i have tried manually adjusting the lookuprange and it worked ! ). But how do i incorporate this through program?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Unable to get the Vlookup Property .... class - Issue with Character / Numeric compari

    Try using the .Find method. It treats everything as a text search.

    Example:
    Please Login or Register  to view this content.

+ 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] Unable to Get the Vlookup property of the WorksheetFunction class
    By DrowingInVBA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2013, 02:02 PM
  2. error 1004 unable to get the vlookup property of the worksheet function class
    By steve99g in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2013, 04:35 PM
  3. Replies: 1
    Last Post: 11-22-2010, 06:10 AM
  4. Unable to get the VLookup property of the WorksheetFunction class
    By JesseBurton in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 12-09-2009, 10:29 AM
  5. Unable to get the Vlookup property of the WorksheetFunction class
    By DoctorG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2006, 02:55 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