The simplest way to do this is with theCOUNTIF function, as explained below.

Not equal to

In Excel, theoperatorfor not equal to is “<>”.

The word “red” can appear in any combination of uppercase or lowercase letters.

Excel formula: Count cells not equal to x or y

COUNTIF can be used to count cells that…

Excel formula: Count cells not equal to many things

Excel formula: Count cells equal to

Excel formula: Count cells that contain specific text

Excel COUNTIF function

Excel COUNTIFS function