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

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

    • COUNTBLANK(A:A) // subtract the number of blank cells

    • Criteria within the formula and must be inside the quotation mark

  2. =COUNTIF(A:A,"<>"&B3)-COUNTBLANK(A:A)

    • COUNTBLANK(A:A) // subtract the number of blank cells

    • Condition within the formula and must be inside the quotation mark

    • Criteria as a cell reference

  3. =COUNTIF(A:A,B4)-COUNTBLANK(A:A)

    • COUNTBLANK(A:A) // subtract the number of blank cells

    • Criteria as a cell reference

  4. =COUNTIF(A:A,B5)-COUNTBLANK(A:A)

    • COUNTBLANK(A:A) // subtract the number of blank cells

    • Criteria as a cell reference

đź’ˇ 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

  1. =COUNTIF(A:A,"<>10")

    • Criteria within the formula and must be inside the quotation mark

  2. =COUNTIF(A:A,"<>"&B3)

    • Condition within the formula and must be inside the quotation mark

    • Criteria as a cell reference

  3. =COUNTIF(A:A,B4)

    • Criteria as a cell reference

  4. =COUNTIF(A:A,B5)

    • Criteria as a cell reference

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