+ Reply to Thread
Results 1 to 10 of 10

WorksheetFunction.VLookup doesnt work if result is #N/A

  1. #1
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    WorksheetFunction.VLookup doesnt work if result is #N/A

    Greetings,
    1- Open enclosed file.
    2- Run Macro1.
    Please Login or Register  to view this content.
    3- See that error picture in the following link;
    http://i.cubeupload.com/7bc7dw.jpg

    Any idea will be appreciated...Thanks in advance...
    Attached Files Attached Files
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  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,425

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    Please Login or Register  to view this content.

    Regards, TMS
    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
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,820

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    When called from VBA, Excel functions do not simply return their associated errors. They cause VBA to "crash".

    What you need to do is use normal error handling (On error statements etc. see http://www.cpearson.com/excel/ErrorHandling.htm ) in anticipation of the error.

    If I understand what you want to do, it appears that you simply need an On error goto exit1 to enable the appropriate error handler.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    Thanks TMS,
    Thanks MrShorty,
    Solved.
    Please Login or Register  to view this content.

  5. #5
    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,425

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    Please Login or Register  to view this content.

    Regards, TMS

  6. #6
    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,425

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    You're welcome. Thanks for the rep.

  7. #7
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    Hi again,
    I am so sorry but this issue is not exactly solved.

    So, please open enclosed file,
    Run Macro1,
    Then please tell me why there is an error there.
    Regards
    Attached Files Attached Files

  8. #8
    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,425

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    Please Login or Register  to view this content.

    Regards, TMS


    Regards, TMS

  9. #9
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    It looks solved. Thanks.

  10. #10
    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,425

    Re: WorksheetFunction.VLookup doesnt work if result is #N/A

    It looks solved.
    AFAICS, it is.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Run macro when cell is changed(also as a result of listboxchange-change event doesnt work)
    By drrazor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2014, 04:13 PM
  2. [SOLVED] SUMIF function don't return same result with Evaluate and Application.WorksheetFunction
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2012, 12:48 PM
  3. Replies: 14
    Last Post: 03-21-2012, 02:38 PM
  4. Sorting doesnt work-sumproduct, vlookup,IF
    By koklok123 in forum Excel General
    Replies: 1
    Last Post: 05-06-2010, 10:11 AM
  5. worksheetfunction.vlookup result when search argument not found
    By Conor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2006, 07:16 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