+ Reply to Thread
Results 1 to 5 of 5

Check if a value is not in a range

  1. #1
    Registered User
    Join Date
    04-08-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    2

    Check if a value is not in a range

    Hi everyone, this is my first post in this community, I aprrcieate your help in advance.

    what im trying to do with a MACRO is to check how many accounts numbers are not in the sheets 2 comparing with the column account number in sheet 1
    pic.png



    i hope you can help me out with this. thanks
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Check if a value is not in a range

    Hi dongabo,

    Welcome to the Forum!

    Here's a quickie:

    Please Login or Register  to view this content.
    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Check if a value is not in a range

    Give this a try:

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  4. #4
    Registered User
    Join Date
    04-08-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    2

    Re: Check if a value is not in a range

    thanks to you all, all run well.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Check if a value is not in a range

    You're welcome!

    And, thanks for the rep!
    Last edited by xladept; 04-19-2016 at 07:33 PM.

+ 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] If a cell is contained in a range, then WORD, if not go check in another range...
    By Marta Garcia in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-15-2016, 07:24 AM
  2. Check if range does NOT match another range
    By samcdavies in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-04-2015, 03:26 PM
  3. [SOLVED] Check if One Range Includes Everything in Another Range
    By JYTS in forum Excel General
    Replies: 7
    Last Post: 10-12-2015, 02:28 AM
  4. Check if value exists in a range, if not add it to that range.Thank you!
    By kiki13140702 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2014, 06:08 PM
  5. Issue Check Box validation, once check box must be ticked in range
    By franksonata in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2012, 07:42 AM
  6. Excel 2007 : check date range and count another range
    By joedbug in forum Excel General
    Replies: 1
    Last Post: 02-18-2010, 01:45 PM
  7. Macro to check range, if false check another range until true, then copy
    By jayers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2009, 04:19 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