+ Reply to Thread
Results 1 to 6 of 6

Help with counting instances meeting multiple criteria

  1. #1
    Registered User
    Join Date
    04-27-2007
    Location
    Oldsmar, FL
    MS-Off Ver
    2010
    Posts
    43

    Help with counting instances meeting multiple criteria

    I'm having trouble coming up with the proper function that counts the number of times something occurs that meets 3 criteria.

    On a separate summary worksheet, I need to count the number of times each person has a status of "C" in a given month when I enter the name of someone listed in the data sheet. (see attached desired outcome)

    In the data sheet I have:
    In column A, I have a date in it in the mm/dd/yy format,
    In column B, I have the status of "c" or "t",
    In column C, I have the name of a person (e.g. John, Mary or Elliott)

    I've tried "sumproduct" but can't get the third criteria to work.

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Assuming that in your summary table you have months (just text) in F1:J1 and names in E2:E10 then in F2

    =SUMPRODUCT(--(MONTH($A$1:$A$100)=F$1),--($B$1:$B$100="c"),--($C$1:$C$100=$E2))

    copy across and down as necessary

  3. #3
    Registered User
    Join Date
    04-27-2007
    Location
    Oldsmar, FL
    MS-Off Ver
    2010
    Posts
    43
    What if my month is in the format of mm/dd/yy? As a side note, I've been able to reference the month into a number, e.g.6=June so I can reference that number to count the number of Junes.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Sorry, the formula should have been

    =SUMPRODUCT(--(TEXT($A$1:$A$100,"mmmm")=F$1),--($B$1:$B$100="c"),--($C$1:$C$100=$E2))

    Where F1 contains the full month name, e.g. August and A1:A100 contains dates

  5. #5
    Registered User
    Join Date
    04-27-2007
    Location
    Oldsmar, FL
    MS-Off Ver
    2010
    Posts
    43
    Thanks again, but I guess I'm in over my head. I'm one of those guys that can use some simple functions but don't understand the cause and relationship of what I'm doing.

    What is the formula pointing to in $E2? Is this the list of people that have?

    And is the -- to be substituted with something else?

    Thanks

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Yes, I'm assuming, as per your image, that you have a table with months across the top, e.g. F1:J1 and names down the side, i.e. E2:E10 or further, then formula goes in F2 and can be copied across and down

    The formula should be used as written. The -- are an integral part, these convert arrays of TRUE/FALSE values returned by statements like

    $B$1:$B$100="c"

    to 1/0 values which SUMPRODUCT can use

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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