Count cells but omit ones with certain text

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
929
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Code:
=COUNTIF(A1:A7,"<>Blue")
?
 
Last edited:
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,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

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