# SUM with 2 conditions, can't use a COUNTIF

1. ## 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?

2. ## 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. ## 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)

4. ## 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!

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

#### 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