COUNTIFS When Excluding a Value

ShaunF

Board Regular
Joined
Jan 17, 2015
Messages
56
Hi,

Covid brain fog here. After a COUNTIFS formula when counting values, though excluding some.

For example, if I had -

Banana
Apple
Apple
Orange
Pear
Peach

- and I wanted to count all values (excluding apple) it would return 4.

Thanks,

Shaun.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Like this:

Book1
AB
1
2Banana4
3Apple
4Apple
5Orange
6Pear
7Peach
Sheet1
Cell Formulas
RangeFormula
B2B2=COUNTIF(A2:A7,"<>Apple")
 
Upvote 0
Typically you would put the value in a cell in which case it would look something like this:
Excel Formula:
=COUNTIF(A2:A7,"<>" & C2)
where C2 contains Apple.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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