Count cells not equal to in Excel and Google Sheets

=COUNTIF(A:A,"<>10")-COUNTBLANK(A:A)

=COUNTIF(A:A,"<>"&B3)-COUNTBLANK(A:A) // Criteria as a cell reference

A:A = Range

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.

Count cells not equal to in Excel

How to count cells not equal to in Excel?

COUNT CELLS NOT EQUAL TO — EXCEL FORMULA AND EXAMPLE

💡 Excel COUNTIF will include blank cell as well and we need to subtract the number of blank cells "-COUNTBLANK(A:A)" in the actual formula

Count cells not equal to in Google Sheets

How to count cells not equal to in Google Sheets?

COUNT CELLS NOT EQUAL TO — GOOGLE SHEETS FORMULA AND EXAMPLE

Wild cards and regular expressions in Excel and Google Sheets

Wild cards and regular expressions
Other useful "COUNT FUNCTIONS: NUMBER BASED CRITERIA" formulas in Excel and Google SheetsOthers FormulasDate and time functionsNumber based criteriaText-based criteriaExtract functions