+ Reply to Thread
Results 1 to 10 of 10

countifs statement with multiple criteria for multiple criteria ranges

  1. #1
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    countifs statement with multiple criteria for multiple criteria ranges

    Hi, all,

    I have 3 columns of data: Unit (Column A), Prob (B), Sever (C). By unit, I want to count the # of cases where (Prob = "HIGH" or "MEDIUM") and (Sever = "HIGH" or "MEDIUM").

    I have attached a sample workbook to illustrate my problem. Column N includes my try at the correct formula, but as you will see it is not working.

    The formula I am trying is:
    =SUM(COUNTIFS($A$2:$A$61,"U"&M7,$B$2:$B$61,{"MEDIUM","HIGH"},$C$2:$C$61,{"MEDIUM","HIGH"}))

    I notice if I change the order of "MEDIUM" and "HIGH" within the curly brackets that it changes the results.

    Let me know what additional information will help clarify my intent. Thanks for the help!

    test.xlsx

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: countifs statement with multiple criteria for multiple criteria ranges

    Something like this in N2?

    Please Login or Register  to view this content.
    Entered as an array formula and confirmed with CTRL+SHIFT+ENTER, drag down to fill.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: countifs statement with multiple criteria for multiple criteria ranges

    Can you explain the *OR part of this, I am not familiar with that. I've used OR statements, but am not sure what the *OR is doing (multiplying?)
    Last edited by mcdermott2; 05-07-2015 at 11:09 AM.

  4. #4
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: countifs statement with multiple criteria for multiple criteria ranges

    That almost works. For U120, the count is 5 although in column C "SEVER" is listed as LOW for one instance, so the count should be 4. I need the count to only occur if (prob=high or medium) AND (sever=high or medium)


    Capture.JPG

  5. #5
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: countifs statement with multiple criteria for multiple criteria ranges

    In this context, Excel reads * as "and" and + as "or". I used the OR function because it is a little cleaner in this application than the use of the + operator.

  6. #6
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: countifs statement with multiple criteria for multiple criteria ranges

    A little bit of logical manipulation should fix it. Try this instead, more simplistic. Utilizes COUNTIFS, so you don't have to use an array:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: countifs statement with multiple criteria for multiple criteria ranges

    Regarding the result list in N column,

    Why you don't create copy unique filter? notice that some cells has double data ( Example : 113 ), IMHO it will causing biased when you sum the data.

  8. #8
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: countifs statement with multiple criteria for multiple criteria ranges

    That works! Although, the reason I am looking for a formula with multiple criteria for multiple criteria ranges is that I have other similar tasks that involve summing that can't be simplified into a single criteria. For instance, I will need to perform a count if (prob=H and sever=L) or (prob=L and sever=H) or (prob=M and sever=M). Perhaps I can get something to work, but if you have any insight it would be appreciated!

  9. #9
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: countifs statement with multiple criteria for multiple criteria ranges

    Look into using SUMPRODUCT with the logical operators I described before. You will not have to enter it as an array formula since it inherently takes into account array formulas as its input.

  10. #10
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: countifs statement with multiple criteria for multiple criteria ranges

    Great, Thanks for the help!

+ 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] Help with Countifs in multiple ranges & multiple criteria
    By earlcarl13 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2015, 11:41 PM
  2. Replies: 5
    Last Post: 05-04-2014, 10:56 AM
  3. [SOLVED] Countifs with multiple criteria and one criteria has a list of names
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2014, 05:25 PM
  4. need a countifs statement that looks at multiple criteria
    By gm2034500 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2013, 09:45 PM
  5. Replies: 4
    Last Post: 03-30-2013, 08:36 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