COUNTIFS Excluding Range

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
832
Office Version
  1. 365
Platform
  1. Windows
COUNT Cat in A if B is a - =COUNTIFS(A2:A11,"Cat", B2:B11, "a")
COUNT Cat in A if B is a BUT Exclude if Column C is an x, y or z =COUNTIFS(A2:A11,"Cat", B2:B11, "a", C2:C11, "<>x", C2:C11, "<>y", C2:C11, "<>z")

Was wondering if my range was very long is there a way to add the range in formula, something like
=COUNTIFS(A2:A11,"Cat", B2:B11, "a", C2:C11 Doesn't CONTAIN anyting in Range E2:E4



Range is A2:E11
cataxx
dogbvy
catayz
catbz
appleax
bananady
cherrycz
catbz
catap
catat
 

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
How about:

Dante Amor
ABCDEF
1
2cataxx4
3dogbvy
4catayz
5catam
6appleax
7catam
8cherrycz
9catax
10catap
11catat
Hoja1
Cell Formulas
RangeFormula
F2F2=SUMPRODUCT((A2:A11="cat")*(B2:B11="a")*(NOT(ISNUMBER(MATCH(C2:C11,E2:E4,0)))))
 
Upvote 0
Solution
Hi, @uk747

Two options:
Excel Formula:
=SUM(COUNTIFS(A2:A11,"cat",B2:B11,"a",C2:C11,HSTACK(G2:G4,"*"))*{-1,1})
=SUMPRODUCT(--(A2:A11="cat"),--(B2:B11="a"),1-COUNTIF(G2:G4,C2:C11))
Blessings!
 
Upvote 0
Thanks
All 3 worked (after editing G2:G4 range to E2:E4 for johnmpl solution)
 
Upvote 1

Forum statistics

Threads
1,215,372
Messages
6,124,532
Members
449,169
Latest member
mm424

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