COUNTIFS with OR

megera716

Board Regular
Joined
Jan 3, 2013
Messages
139
Office Version
  1. 365
Platform
  1. Windows
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")
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try:
Code:
[COLOR=#333333]=COUNTIFS(Q$2:Q$1127,$B1136,F$2:F$1127,"Y",$A$2:$A$1127,"Provider") + [/COLOR][COLOR=#333333]COUNTIFS(Q$2:Q$1127,$B1136,F$2:F$1127,"Y",$A$2:$A$1127,"Investor")[/COLOR]
 
Upvote 0
D'oh, of course!! I should have known that. Thanks! (I assume the same thing will work for the SUMIFS).
 
Upvote 0
Thanks! (I assume the same thing will work for the SUMIFS).
You are welcome.
Yes, the same logic should work for SUMIFS.
 
Upvote 0
It can also be:

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

Forum statistics

Threads
1,213,568
Messages
6,114,348
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top