+ Reply to Thread
Results 1 to 4 of 4

Multiple CountIfs Not Working

  1. #1
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Multiple CountIfs Not Working

    Hi Guys, I've just stumbled upon this great article https://www.ablebits.com/office-addi...nctions-excel/ and for a future project I have in mind Array Formulas are the way to go.
    My query is not relating to an Array Formula but I'm unfamiliar with the CountIfs function in the 2nd example with the tutorials.

    I'm pretty sure my code is spot-on but it's not working.
    Please Login or Register  to view this content.
    Oddly if I change the formula like an array formula below it works. I know it's not actioned like an array formula but to me it's referencing the apples and lemons like an array; referencing the criteria2 as an array instead of superfluously having to reference the criteria ranges and criteria again with lemons.
    Please Login or Register  to view this content.
    I'd be grateful if someone could advise why the basic CountIf is not working?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,720

    Re: Multiple CountIfs Not Working

    Quite simply this is an AND situation, not OR:

    =COUNTIFS(B4:B11, "sally", C4:C11, "apples", C4:C11, "lemons")

    C4:C11 cells cannot be both.

    Try this:

    =SUM(COUNTIFS(B4:B11, "sally",C4:C11, "lemons"),COUNTIFS(B4:B11, "sally",C4:C11, "apples"))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: Multiple CountIfs Not Working

    Thanks AliGW, makes sense, thank you very much, I should read on in the examples which do go on to and/ or operators being used in Array Formulas.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,720

    Re: Multiple CountIfs Not Working

    You are welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Multiple COUNTIFS formulas in one cell is not working.
    By Jriggerz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2017, 09:22 AM
  2. countifs not working
    By superchew in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-02-2016, 04:48 PM
  3. Countifs not working
    By cardonas in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-30-2016, 01:32 PM
  4. Counts with multiple criteria, COUNTIFS not working
    By IbeforeV in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-01-2014, 01:22 PM
  5. [SOLVED] countifs working on extended ranges and different sheets not working
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 02:23 PM
  6. 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
  7. COUNTIFS not working
    By nosenga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2011, 04:38 AM

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