FormulaCraft

How to count cells not equal to a value in Excel and Google Sheets

Topic:COUNTIF & COUNTIFS
Excel & Google Sheets
=COUNTIF(A2:A5,"<>"&"Pending")

Verified example

Computed by a real spreadsheet engine on the sample data below.

Status
Pending
Approved
Rejected
Approved

=COUNTIF(A2:A5,"<>"&"Pending")3

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Select the cell where you want the count to appear.
  2. 2Type =COUNTIF( then select your data range (e.g., A2:A100).
  3. 3For the criteria, type "<>" concatenated with the value to exclude, such as "<>"&"Pending" or simply "<>Pending".
  4. 4Close the parenthesis and press Enter to get the count of cells that do not equal the specified value.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Is the comparison case-sensitive?

No, COUNTIF is case-insensitive, so 'pending', 'Pending', and 'PENDING' are all treated the same.

Can I exclude multiple values at once?

Yes — use =COUNTA(range)-COUNTIF(range,"Value1")-COUNTIF(range,"Value2") or sum multiple COUNTIF expressions.

More on COUNTIF & COUNTIFS

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: