+ Reply to Thread
Results 1 to 4 of 4

COUNTIF for Array

  1. #1
    Registered User
    Join Date
    05-31-2017
    Location
    Brunswick, ME
    MS-Off Ver
    2013 (work) and 365 (home)
    Posts
    70

    COUNTIF for Array

    I'm trying to find a way to do a COUNTIF on two arrays to return the total number of entries that are not the same.
    In the attached example, the formula should return a value of 2 in the yellow highlighted cell when comparing the blue and orange columns.
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: COUNTIF for Array

    Try

    =SUMPRODUCT(--($A$2:$A$6<>B2:B6))

  3. #3
    Registered User
    Join Date
    05-31-2017
    Location
    Brunswick, ME
    MS-Off Ver
    2013 (work) and 365 (home)
    Posts
    70

    Re: COUNTIF for Array

    That works. Thank you.

    For my own knowledge, what function does the "--" perform?

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: COUNTIF for Array

    You're welcome.

    -- converts True/False responses to 1/0 responses
    True = 1
    False = 0

+ 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. countif VBA Array's
    By samot79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2016, 08:44 PM
  2. countif from array
    By Bart00 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2016, 03:49 PM
  3. [SOLVED] IF array with COUNTIF??????
    By alfgrey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2013, 07:10 AM
  4. [SOLVED] Countif in an array
    By Petijandro in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-29-2013, 07:48 AM
  5. CountIf Array Problem
    By aborg88 in forum Excel General
    Replies: 9
    Last Post: 10-04-2011, 02:42 AM
  6. Array Countif
    By H43825 in forum Excel General
    Replies: 1
    Last Post: 05-01-2009, 12:04 PM
  7. [SOLVED] How do I use countif an array for >=45<=50
    By البيانات in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-04-2006, 04:25 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