Count cells but omit ones with certain text

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
871
Office Version
  1. 365
Platform
  1. Windows
Is there a formula to count all cells but omit ones with certain text?

for example: I want to count all of the cells below but I do not want to count the ones containing the word "Blue"

Yellow
Red
Blue
Green
Yellow
Red
Purple

the result would be: 6

Help with this would be greatly appreciated.

Carla
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Code:
=COUNTIF(A1:A7,"<>Blue")
?
 
Last edited:
Upvote 0
I there a way to not include blanks as well?, Thank you :)
 
Upvote 0
ow about
=COUNTIFS(C2:C10,"<>Blue",C2:C10,"?*")
 
Upvote 0
Can I ask what does "?*" mean? is that how we search for blank cell. Thank you
 
Upvote 0
Not include black cells. Sorry I did not read that. Ok I know why now. Thank you
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,287
Members
448,562
Latest member
Flashbond

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