# Google Sheets: How to COUNTIF Not Equal to Text

You can use the following formula in Google Sheets to count the number of cells that are not equal to a specific text:

```=COUNTIF(A2:A11, "<>some_string")
```

This particular formula counts the number of cells in the range A2:A12 that are not equal to “some_string.”

Note: The <> operator stands for “not equal” in Google Sheets.

The following example shows how to use this formula in practice.

## Example: COUNTIF Not Equal to Text in Google Sheets

Suppose we have the following dataset that contains information about various basketball players: We can use the following formula to count the number of cells in the Team column that are not equal to “Hawks”:

`=COUNTIF(A2:A12,"<>Hawks")`

The following screenshot shows how to use this formula in practice: From the output we can see that there are 8 cells not equal to “Hawks” in the Team column.

If you would like to count the number of cells not equal to several different text, you can instead use the COUNTIFS function.

For example, we can use the following formula to count the number of cells in the Team column that are not equal to “Hawks” or “Spurs”:

```=COUNTIFS(A2:A12,"<>Hawks", A2:A12, "<>Spurs")
```

The following screenshot shows how to use this formula in practice: From the output we can see that there are 6 cells not equal to “Hawks” or “Spurs” in the Team column.