+ Reply to Thread
Results 1 to 3 of 3

If criteria not met then Message Box and End Sub

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    71

    If criteria not met then Message Box and End Sub

    I have a cell that is filled out and must be nine digits. I would like to create a macro that will check if a bogus number was input in a named range. It must be nine digits and cannot be "999999999" or "000000000". I tried the code below and it does not work. Can someone please tell me what I'm doing wrong?

    Please Login or Register  to view this content.
    Last edited by DoodlesMama; 02-05-2016 at 04:24 PM.

  2. #2
    Registered User
    Join Date
    04-14-2012
    Location
    egypt
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: If criteria not met then Message Box and End Sub

    try this
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-05-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: If criteria not met then Message Box and End Sub

    Works perfect! Thank you very 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. Replies: 0
    Last Post: 02-10-2015, 09:47 AM
  2. [SOLVED] 3 criteria error message
    By ygoksel in forum Excel General
    Replies: 5
    Last Post: 09-25-2014, 05:10 AM
  3. [SOLVED] Message box that returns a cell value if a criteria is met.
    By samdegg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2014, 09:57 AM
  4. [SOLVED] Excel 2007 VBA Message Box with criteria
    By kj2607 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2013, 06:51 AM
  5. Macro to say message if certain criteria are met
    By sandbach in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-30-2010, 05:05 PM
  6. Using Error Message as test Criteria
    By Taru in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-16-2006, 12:55 PM
  7. [SOLVED] popup message if certain criteria met in formula result
    By John Davies in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

Tags for this Thread

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