+ Reply to Thread
Results 1 to 5 of 5

Problem with Application.WorksheetFunction.VLookup

  1. #1
    Registered User
    Join Date
    11-01-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    2

    Problem with Application.WorksheetFunction.VLookup

    Hi,

    I have a problem with Application.WorksheetFunction.VLookup

    I have some itens in a table. In the same colunm are diferents data types, Variant, Double and String.

    When i use the function bellow, some itens show errors.


    code:
    ----------------------
    Please Login or Register  to view this content.
    ----------------------

    file
    Search.xlsm


    There are differents data types in Customer's table.

    How can I fix this problem?


    Thanks,

    Romeu
    Last edited by alansidman; 11-01-2013 at 01:04 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2407 Win 11 Home 64 Bit
    Posts
    24,068

    Re: Problem with Application.WorksheetFunction.VLookup

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added them for you this time. Please read all the rules and abide by them in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem with Application.WorksheetFunction.VLookup

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    11-01-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Problem with Application.WorksheetFunction.VLookup

    Hi Norie,

    Thanks for your help.

    I have used your code and I have only one error more.

    There are one item the code doesn´t work.

    Imagem error
    error.jpg



    Please Login or Register  to view this content.


    New excel file (with your code)


    Search_v1.xlsm

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem with Application.WorksheetFunction.VLookup

    You should fix the data so it's all text.

    PS There's no need for On Error Resume Next in the code I posted.

+ 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. Application.worksheetfunction.match problem
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-28-2013, 08:47 AM
  2. Application, WorksheetFunction or both?
    By Benni in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2012, 08:59 PM
  3. Application.WorksheetFunction.VLookup / Runtime 9
    By Tino XXL in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2011, 04:29 AM
  4. Application.WorksheetFunction problem
    By Gary''s Student in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-18-2005, 03:05 PM
  5. Application.WorksheetFunction.Match problem
    By Carl Brehm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2005, 11:06 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