+ Reply to Thread
Results 1 to 7 of 7

Countifs with more than 2 or statements

  1. #1
    Registered User
    Join Date
    10-02-2014
    Location
    NY,NY
    MS-Off Ver
    MS Office 2010
    Posts
    13

    Countifs with more than 2 or statements

    Hi all,

    The following formula works as intended:
    Please Login or Register  to view this content.
    However, I read that having more than two or statements inside the countifs() statement, will cause the wrong results, ie. I shouldn't do this:
    Please Login or Register  to view this content.
    How can I write such countifs() formula with 3+ or statements?
    Last edited by edost4; 10-12-2018 at 10:45 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,824

    Re: Countifs with more than 2 or statements

    It is the third one which is causing you problems - you can't put cell references inside an array constant.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-02-2014
    Location
    NY,NY
    MS-Off Ver
    MS Office 2010
    Posts
    13

    Re: Countifs with more than 2 or statements

    Pete, I understand that- just not how to correct it. Do you think you can show how I can re-write this formula so it works?
    Currently the best I can come up with is:
    SUM(COUNTIFS(Data!$O:$O,">="&Leaderboard!I$202,Data!$O:$O,"<"&Leaderboard!J$202,Data!$DH:$DH,Leaderboard!$B203,Data!$HG:$HG,{"<>-","-","<>-"},Data!$HD:$HD,{"Q4 2018 Campaign","Q4 2018 Campaign",""},Data!$HE:$HE,""))+SUM(COUNTIFS(Data!$O:$O,">="&Leaderboard!I$202,Data!$O:$O,"<"&Leaderboard!J$202,Data!$DH:$DH,Leaderboard!$B203,Data!$HG:$HG,{"<>-","-","<>-"},Data!$HD:$HD,{"Q4 2018 Campaign","Q4 2018 Campaign",""},Data!$HE:$HE,">"&"Data!$HF:$HF))
    Last edited by edost4; 10-12-2018 at 11:23 AM.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,824

    Re: Countifs with more than 2 or statements

    What is the last pair of terms meant to be doing?

    Pete

  5. #5
    Registered User
    Join Date
    10-02-2014
    Location
    NY,NY
    MS-Off Ver
    MS Office 2010
    Posts
    13

    Re: Countifs with more than 2 or statements

    @pete Last pair as in Data!$HE:$HE,">"&"Data!$HF:$HF? It is comparing two date columns, both in the same row in "Data" tab
    Last edited by edost4; 10-12-2018 at 10:49 AM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,681

    Re: Countifs with more than 2 or statements

    Don't know that it will make a difference, however there looks to be an extra quotation after the ampersand: Data!$HE:$HE,">"&"Data!$HF:$HF
    If that doesn't help, perhaps you could upload a desensitized/fictional sample demonstrating what you are trying to accomplish.
    To upload a sample workbook (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    10-02-2014
    Location
    NY,NY
    MS-Off Ver
    MS Office 2010
    Posts
    13

    Re: Countifs with more than 2 or statements

    I fixed this with sumproduct

+ 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] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  2. How can I run CountIfs + CountIfs without double counting?
    By hiitsjessie in forum Excel General
    Replies: 1
    Last Post: 02-06-2017, 04:49 PM
  3. [SOLVED] Excel 2007: Combining countifs statements
    By 2ruble in forum Excel General
    Replies: 4
    Last Post: 03-25-2014, 06:35 PM
  4. [SOLVED] Can I nest Countifs Statements in an IF / OR statement?
    By CWatsonJr in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-02-2013, 04:13 PM
  5. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  6. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  7. Replies: 12
    Last Post: 05-15-2009, 08:38 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