+ Reply to Thread
Results 1 to 2 of 2

Exit Loop If Value Not Matched

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Exit Loop If Value Not Matched

    Hi all,

    Hope all is well!

    I am exit a macro if a condition is not met.

    I have a user input in the form of MMM (e.g. JAN, FEB...).

    I want the macro to loop through a row and check that the user input matches any cell in this range.

    If it does not I would like the macro to exit sub.


    Can anyone help me write this code?


    Kind regards,

    Coeus.

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Exit Loop If Value Not Matched

    So you have already created your USERFORm, with Text Box, and RangeOfMMM is also placed..
    Can you please share.. sheet with userform.. so we dont have to go with assumption of

    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

+ 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] Exit for each loop condition[s]
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 07-16-2013, 10:44 AM
  2. ESCAPE ket to exit loop??
    By nikko50 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2013, 07:49 PM
  3. Exit loop
    By ashmott in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2011, 05:41 AM
  4. exit loop when find value?
    By sweetboy02125 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2011, 03:42 PM
  5. [SOLVED] exit for next loop
    By David Henderson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2006, 02:45 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