+ Reply to Thread
Results 1 to 6 of 6

Help with errorhandling

  1. #1
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Help with errorhandling

    Hello!

    In the attached file I have a vlookup subroutine which kicks off if you doubleclick a cell in the range E2:E100.
    What it does is that it finds the product number and price for each cell you doubleclick, works great.

    But if you for instance manually type an article name and do not manually type the price and article number,
    the code returns #N/A, and the next time I doubleclick, it returns "mismatch" error.

    How can I adjust the code so that instead of returning #N/A it leaves the cells blank and does not give me the mismatch error?

    I've tried replacing "#Value" with "" and also "on error to to 0" with "on error resume to next" but I cant get it to work properply, in the end I always get a mismatch error.

    Please Login or Register  to view this content.
    Please help!
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with errorhandling

    Replace this line

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Re: Help with errorhandling

    Quote Originally Posted by :) Sixthsense :) View Post
    Replace this line

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.
    Thank you! That removed my mismatch error, but it still prints #N/A if there is no match.
    I want it to leave the cells blank.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with errorhandling

    May be this??

    Please Login or Register  to view this content.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help with errorhandling

    Or

    This??

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Re: Help with errorhandling

    Quote Originally Posted by :) Sixthsense :) View Post
    Or

    This??

    Please Login or Register  to view this content.
    This is the keeper! Thanks so much!

+ 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. Errorhandling code which operates at Form level - professional approach
    By Greg M in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-20-2011, 06:21 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