+ Reply to Thread
Results 1 to 4 of 4

SUM with 2 conditions, can't use a COUNTIF

  1. #1
    Registered User
    Join Date
    02-09-2007
    Posts
    29

    SUM with 2 conditions, can't use a COUNTIF

    Say I have 2 columns. One has various strings, say "dog" or "cat." The second column has various numbers, say "0" or "0.99."

    How can I create a "countif" that match say both "cat" and "0.99." Google tells me that countif can not match multiple conditions, so I need to use a sum formula.

    What I've got so far from another website is this formula, but it does not seem to be working.

    Please Login or Register  to view this content.
    I also tried

    Please Login or Register  to view this content.
    Any ideas?
    Last edited by Lazhal; 03-04-2011 at 08:59 PM.

  2. #2
    Registered User
    Join Date
    02-09-2007
    Posts
    29

    Re: SUM with 2 conditions, can't use a COUNTIF

    BAHHHH, nevermind, I forgot this has to be an array. I can't delete the post so I'll just put this here.

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: SUM with 2 conditions, can't use a COUNTIF

    ...simpler to use SUMPRODUCT, though, as that formula can be entered normally, i.e.

    =SUMPRODUCT(($I$2:$I$100="cat")*($F$2:$F$100=0.99))

    ....or if you have excel 2007 or later you can use COUNTIFS (with an "S" at the end)

    =COUNTIFS($I$2:$I$100,"cat",$F$2:$F$100,0.99)
    Audere est facere

  4. #4
    Registered User
    Join Date
    02-09-2007
    Posts
    29

    Re: SUM with 2 conditions, can't use a COUNTIF

    Cool, I'll give that a try now. My original solution only worked inside the same sheet anyway, so I'll try yours linking to the separate sheet.


    EDIT: COUNTIFS works great! Thank you!
    Last edited by Lazhal; 03-04-2011 at 09:08 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