Countifs with an OR

Upex

Board Regular
Joined
Dec 29, 2010
Messages
197
Office Version
  1. 365
Platform
  1. Windows
Hi all, hope you're well.

Trying to count rows that meet numerous conditions but I cannot figure out how to embed an 'OR' or such like. I want to count if range 1-4 all match and then if range5 is a match OR if range6 is a match, but to only count once if both 5 and 6 match and not count at all if neither 5 nor 6 is a match.

1,2,3,4,5,6 = true = count 1
1,2,3,4,5 = true = count 1
1,2,3,4,6 = true = count 1
1,2,3,4 = true = no count

Tried various things but can't get anything to work - any ideas?

countifs(range1,criteria1,range2,criteria2..... OR(AK:AK,BD:BD),{"*term1*","*term2*","*term3*"})

countifs((range1,criteria1,range2,criteria2.....OR(AK:AK={"*term1*","*term2*","*term3*"},BD:BD={"*term1*","*term2*","*term3*"})

type thing - but that works - TIA :-)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I'd probably use FILTER for this as you have 365, but you should be able to use something like:

Excel Formula:
=SUM(countifs((range1,criteria1,range2,criteria2,AK:AK,{"*term1*","*term2*","*term3*"},BD:BD,{"*term1*";"*term2*";"*term3*"}))

Note the semicolons, not commas, in the second array.
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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