+ Reply to Thread
Results 1 to 7 of 7

COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be true

  1. #1
    Registered User
    Join Date
    12-14-2016
    Location
    NY, USA
    MS-Off Ver
    2016
    Posts
    4

    Question COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be true

    Hello,

    This is a watered down example of the type of calculation I am trying to get working for simplicity for my question here. I need to count the number of cells that match a few different values in each row(in this example case they can be "accepted" or "requested"), but only if they match the correct type in the columns (Mgr, Staff, Trainee). I am trying to get the formulas for the counts on the left side to function. I have tried many different iterations of COUNTIFS(), SUM(COUNTIFS()), SUMPRODUCT(), etc. I always end up either with errors or double counting or only matching on partial dependencies, etc. Any help would be greatly appreciated as I was trying to just come up with a simple, quick way to do some preliminary scheduling before putting things in our ridiculously unfriendly scheduling application that does not make later changes easy. But, this has ended up wasting a lot of my time trying to make work and is becoming counter productive

    Thanks ahead of time for any assistance to get those first three columns counting employees available by position properly.


    example.PNG

    logic is: IF value="accepted" or "requested" AND person is Mgr THEN increment Mgr count for that row
    IF value="accepted" or "requested" AND person is Staff THEN increment Staff count for that row
    IF value= anything else (i.e. busy in this example) do nothing
    Last edited by HelpP; 12-14-2016 at 10:10 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be tru

    have a look of the attached file
    Attached Files Attached Files
    Last edited by AlanY; 12-14-2016 at 10:39 AM.

  3. #3
    Registered User
    Join Date
    12-14-2016
    Location
    NY, USA
    MS-Off Ver
    2016
    Posts
    4

    Re: COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be tru

    That seems to work, thanks. I think I was trying to do too much with as little as possible and it just wasn't working maybe. I was trying things like this:

    =SUM(COUNTIFS($E3:$H3,{"accepted","requested"},$E$2:$H$2,"Mgr"))

    (and similar types of condensing things with SUMPRODUCT... I forget the exact formula I had tried, but it was similar to that)

  4. #4
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be tru

    you're welcome.

    yours should work as an array formula, i.e. confirm with shift-control-enter

  5. #5
    Registered User
    Join Date
    12-14-2016
    Location
    NY, USA
    MS-Off Ver
    2016
    Posts
    4

    Re: COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be tru

    Wow... Ok I had no idea about "shift-control-enter". It almost works as array formula... it only hits on "accepted" but not "requested". It seems to only pay attention to the first possible option ( in this case "accepted").
    Last edited by HelpP; 12-14-2016 at 11:40 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be tru

    it works, see attached, hit the F9 to test
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-14-2016
    Location
    NY, USA
    MS-Off Ver
    2016
    Posts
    4

    Re: COUNTIFS? SUMPRODUCT? Not sure how to count when requiring multiple criteria to be tru

    hmmm... it does seem to work... Oh, I think it may be a limitation of google sheets? (should have mentioned that is where I am working on the actual doc)

+ 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. Help with countifs or sumproduct with multiple criteria function
    By thezwashere in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2015, 11:26 PM
  2. Replies: 6
    Last Post: 10-21-2015, 09:44 AM
  3. [SOLVED] Require Sum(Index or SUMPRODUCT or COUNTIFS forumula with multiple criteria
    By Quasis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2015, 05:02 AM
  4. ranking with sumproduct or countifs with multiple criteria
    By cwchan220 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-13-2014, 04:12 PM
  5. [SOLVED] Sumproduct or countifs to count for mutiple criteria
    By Groovicles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2014, 11:20 AM
  6. [SOLVED] Sumproduct / Countifs multiple criteria
    By Biffer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-25-2013, 11:08 AM
  7. [SOLVED] Need to use either COUNTIFS or SUMPRODUCT to count rows based on multiple criteria
    By erabinov in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2013, 03:15 PM

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