This problem can be solved with the COUNTIFS function or the SUMPRODUCT function, as explained below.
Not equal to
The not equal tooperatorin Excel is <>.
The second formula returns FALSE since A1 is equal to 10.
We want to count cells where the color isnotred or blue.
The conditions given to COUNTIFS are supplied with range/criteriapairs, and can uselogical operators.
The key in this case is to use the “not equals” operator, which is <>.
Alternative with SUMPRODUCT
TheSUMPRODUCT functioncan also count cells that meet multiple conditions.
Not equal to many things
The formulas above do scale well as you add more conditions.
To count cells not equal to many things with a more streamlined formula,see this example.