+ Reply to Thread
Results 1 to 3 of 3

Counting occurrences of two conditions

  1. #1
    Registered User
    Join Date
    10-01-2010
    Location
    Mansfield, MA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Counting occurrences of two conditions

    I'm using Excel 2002 to create a spreadsheet to track false fire alarms for a system of group homes I work with. I'd like to create a table (not a pivot table) that counts the number of fire alarms per house per month. In the attached workbook, I'd like the formula in B4:B11 of the "Summary" tab to count each occurrence of a fire alarm for each residence during each month. For example, B4 in the summary tab should look at 'Data' Column A and C and count the number of times "Boxcar Lane" occurs in Column C, during the month of August from the dates in Column A. I've tried playing around with a few formulas and I can't get it to work. Any suggestions? Keep in mind, there are a few homes listed in the Summary tab that have NO occurrences at all in the data tab, and therefore should return a value of zero. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting occurrences of two conditions

    Try, in B4

    =SUMPRODUCT(--(Data!$C$5:$C$19=$A4),--(TEXT(Data!$A$5:$A$19,"mmmm")=B$3))

    copied across the matrix
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-01-2010
    Location
    Mansfield, MA
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Counting occurrences of two conditions

    Awesome, thanks!

+ 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