Countifs with an OR

Upex

Board Regular
Joined
Dec 29, 2010
Messages
191
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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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