+ Reply to Thread
Results 1 to 8 of 8

Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    Elgin, IL
    MS-Off Ver
    Excel 2006
    Posts
    29

    Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    I need to create a COUNTIF formula that has two unique criteria that must be met. The criteria resides in two unique cell ranges. The resulting total should be if both criteria are met, not a total that counts each criteria separately and then adds them together. I tried the following and realized that the total for each criteria was being counted and then added together to give me the final number.

    =COUNTIF(X:X, "99999") + COUNTIF(Y:Y, "TEXT")

    I'd appreciate any suggestions.

    Thanks, MLCall
    Last edited by MLCall; 07-19-2012 at 10:21 AM. Reason: To show solved.

  2. #2
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    I believe with 2003, you can't use the entire column. Use a maximum expected range (or a dynamic named range) instead.
    For example
    =sumproduct(($x$1:$x$5000="99999")*($y$1:$y$5000="text"))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    01-11-2012
    Location
    Elgin, IL
    MS-Off Ver
    Excel 2006
    Posts
    29

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    I appreciate your quick support. This doesn't seem to be working for me. I'm getting a count of 0 for every combination I've tried to far. Here is a copy of what I typed: =SUMPRODUCT((L2:L236="60102")*(M2:M236="Algonquin"))
    I'll continue to try and figure out what I'm doing wrong.

  5. #5
    Registered User
    Join Date
    01-11-2012
    Location
    Elgin, IL
    MS-Off Ver
    Excel 2006
    Posts
    29

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    I tried this version first (included the dollar signs) and still got a result of 0. I'm trying to determine what I'm doing wrong.
    Here is what I typed: =SUMPRODUCT(($L$2:$L$236="60010")*($M$2:$M$236="Barrington"))

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    Unless your numbers are formatted as text, remove the quotes from around the 60010

  7. #7
    Registered User
    Join Date
    07-19-2012
    Location
    Collingwood
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    =COUNTIFS($L$2:$L$236,60010,$M$2:$M$236,"Barrington")

    This will work

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need COUNTIF Formula That Meets Multiple Unique Criteria in Different Cell Ranges

    To Sturmmann, MLCall has Excel 2003 and so can't use COUNTIFS

+ 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