# Thread: COUNTIFS with OR Thanks:  1 Post #5332892 (1) Likes: 0

1. ## COUNTIFS with OR

Here's my formula right now:
=COUNTIFS(Q\$2:Q\$1127,\$B1136,F\$2:F\$1127,"Y",\$A\$2:\$A\$1127,"Provider")

I want to COUNTIF \$A\$2:\$A\$1127 contains "Vendor" OR "Investor" along with the conditions for ranges in Q and F.

I tried =COUNTIFS(Q\$2:Q\$1127,\$B1140,D\$2:D\$1127,"Y",OR(\$A\$2:\$A\$1127="Vendor",\$A\$2:\$A\$1127="Investor")), but that left me with Excel thinking the whole OR function was only my criteria range so that didn't work.

Edited to add, then I need to do the same thing with SUMIFS. Right now, looks like =SUMIFS(R\$2:R\$1127,Q\$2:Q\$1127,\$B1136,F\$2:F\$1127,"Y",\$A\$2:\$A\$1127,"Provider")

2. ## Re: COUNTIFS with OR

Try:
Code:
`=COUNTIFS(Q\$2:Q\$1127,\$B1136,F\$2:F\$1127,"Y",\$A\$2:\$A\$1127,"Provider") + COUNTIFS(Q\$2:Q\$1127,\$B1136,F\$2:F\$1127,"Y",\$A\$2:\$A\$1127,"Investor")`

3. ## Re: COUNTIFS with OR

D'oh, of course!! I should have known that. Thanks! (I assume the same thing will work for the SUMIFS).

4. ## Re: COUNTIFS with OR

Thanks! (I assume the same thing will work for the SUMIFS).
You are welcome.
Yes, the same logic should work for SUMIFS.

5. ## Re: COUNTIFS with OR

It can also be:

=SUM(COUNTIFS(Q\$2:Q\$1127,\$B1136,F\$2:F\$1127,"Y",\$A\$2:\$A\$1127,{"Provider","Investor"}))

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•