+ Reply to Thread
Results 1 to 5 of 5

counting non matches in two (2) ranges

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    32

    counting non matches in two (2) ranges

    Hi All-

    I'm looking to do this statement

    =countif(a:a,"NOT IN" b2:b10)

    So how do I do this?
    Last edited by NBVC; 01-27-2010 at 12:03 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Countif(A:A,<>B2:B10)

    Try

    =COUNTA(A:A)-SUMPRODUCT(--ISNUMBER(MATCH(A:A,B2:B10,0)))

    however, it is more efficient to use a defined range instead of A:A when using Sumproduct()..

    Better yet, would be to add a helper column to return TRUE/FALSE matches at each row of column A and then use Countif(C:C,FALSE) where Column C contains TRUE/FALSE result of formula: =ISNUMBER(Match(A1,$B$2:$B$10,0)) copied down....
    Last edited by NBVC; 01-27-2010 at 12:06 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: counting non matches in two (2) ranges

    Hi,

    The COUNTIF() function only has two elements. If you're trying to sum the amounts in B2:B10 rather than count them you should be using a SUMIF()

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    10-12-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: counting non matches in two (2) ranges

    Would this work as a count all in column A who's value is in column B:

    =sumproduct(countif(A:A,B:B))

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: counting non matches in two (2) ranges

    Yes... but slow

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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