+ Reply to Thread
Results 1 to 10 of 10

Counting instances with multiple criteria

  1. #1
    Registered User
    Join Date
    06-16-2012
    Location
    Texas
    MS-Off Ver
    Excel 2011
    Posts
    6

    Counting instances with multiple criteria

    Hello,
    I have a database that I'd like to count the number of times a particular phrase comes up for a particular person. These must be unique values. I'll post a sample to show what I mean.

    In the example, I'd like a value to be posted on Sheet 1 where the question mark is. It would find a total of unique failures from the test column in sheet 2. The desired outcome I want is listed on sheet 1. Basically, I want a formula that would count each failure number once for a given employee.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Counting instances with multiple criteria

    This isn't pretty, but this ARRAY FORMULA, committed with CTRL+SHIFT+ENTER (instead of just ENTER) seems to do what you want...
    Please Login or Register  to view this content.
    Copy that formula down as far as you need.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    06-16-2012
    Location
    Texas
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Counting instances with multiple criteria

    Thanks for the quick response. I entered that formula for D3 and it did not calculate when I pressed ctrl, shift, enter. I am on a mac and also attempted cmd, shift, enter. Should I be doing something different? Also, if the data changes in sheet 2, do I have to press ctrl, shift, enter again?

    I apologize, I have never used array formulas before.

    EDIT: Cancel that, I wasn't in the cell when I tried. It works like a charm. Now just have to integrate it into my data. Thanks a million!
    Last edited by crygon; 06-16-2012 at 03:51 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Counting instances with multiple criteria

    so for employee 1, failure: 123 is different to failure: 456, right?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Counting instances with multiple criteria

    Quote Originally Posted by crygon View Post
    Thanks for the quick response. I entered that formula for D3 and it did not calculate when I pressed ctrl, shift, enter. I am on a mac and also attempted cmd, shift, enter. Should I be doing something different? Also, if the data changes in sheet 2, do I have to press ctrl, shift, enter again?

    I apologize, I have never used array formulas before.

    EDIT: Cancel that, I wasn't in the cell when I tried. It works like a charm. Now just have to integrate it into my data. Thanks a million!
    You're very welcome....I'm glad I could help.

  6. #6
    Registered User
    Join Date
    06-16-2012
    Location
    Texas
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Counting instances with multiple criteria

    Can't seem to get it to work. In our example Sheet2 does not have quotes. My actual spreadsheet's sheet name is cvs - data. Excel wants quotes so in fomula it ends up being 'cvs - data'. Is there an issue with this? Is there anywhere that I can get more detail on why/how the formula works?

  7. #7
    Registered User
    Join Date
    06-16-2012
    Location
    Texas
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Counting instances with multiple criteria

    Okay. Think I might be getting into another problem. My "test" column is more than just "failure" and a number. It's "failure" a number, followed by some notes. These notes may be different for each "failure-123". I want "failure-123 Hello" and "failure-123 Goodbye" to only count as one.

  8. #8
    Registered User
    Join Date
    06-16-2012
    Location
    Texas
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Counting instances with multiple criteria

    Quote Originally Posted by FDibbins View Post
    so for employee 1, failure: 123 is different to failure: 456, right?
    Yes. I also found that I need a little more. In that column there will be a "failure: 123 Hey buddy" and "failure: 123 That's not good". I would want these to only count as one.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Counting instances with multiple criteria

    would the extra text be in its own column, or part of the 123 etc?

  10. #10
    Registered User
    Join Date
    06-16-2012
    Location
    Texas
    MS-Off Ver
    Excel 2011
    Posts
    6

    Re: Counting instances with multiple criteria

    Quote Originally Posted by FDibbins View Post
    would the extra text be in its own column, or part of the 123 etc?
    Unfortunately, in the same column. The data is extracted from a FileMaker database.
    Last edited by crygon; 06-16-2012 at 05:57 PM.

+ 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