+ Reply to Thread
Results 1 to 4 of 4

COUNTIFS with OR

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    COUNTIFS with OR

    Hi,

    I am trying to do a countifs formula which checks if criteria_range1=criteria OR criteria_range2=criteria2

    Here is a simplified example:

    1 2
    2 3
    1 1
    2 2
    3 1
    1 1
    3 1
    1 3

    The formula would check if the number 1 appears in either column a or column b, so in this instance the formula would return a count of 6.

    Thanks
    Last edited by anteagles20; 08-21-2012 at 05:48 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: COUNTIFS with OR

    Try this syntax

    =SUMPRODUCT(((A2:A10=1)+(B2:B10=1)>0)+0)
    Audere est facere

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

    Re: COUNTIFS with OR

    Try:

    =SUMPRODUCT(--((A2:A9=1)+(B2:B9=1)>0))

    where A2:B9 is the range.
    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.

  4. #4
    Forum Contributor
    Join Date
    08-20-2012
    Location
    Walsall,England
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: COUNTIFS with OR

    Thanks guys!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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