By default, the **COUNTIF** function in Google Sheets is not case-sensitive.

However, you can use the following formula to perform the equivalent of a case-sensitive COUNTIF function:

=SUMPRODUCT(REGEXMATCH(A1:A10, "Mavs"))

This particular formula will only count the number of cells in the range **A2:A10** equal to “Mavs” with the exact case match.

In other words, cells with the text “mavs” or “MAVS” would not be counted.

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

**Example: How to Use Case Sensitive COUNTIF in Google Sheets**

Suppose we have the following dataset that contains information about various basketball players:

Suppose we used the following formula to count the number of cells in the **Team** column that have text equal to “Mavs”:

=COUNTIF(A1:A10, "Mavs")

The following screenshot shows how to use this formula in practice:

The formula returns a value of **4** since it found “Mavs” (case-insensitive) exactly four times in the **Team** column.

To use a case-sensitive COUNTIF function, we can instead type the following formula into cell **D2**:

=SUMPRODUCT(REGEXMATCH(A1:A10, "Mavs"))

The following screenshot shows how to use this formula in practice:

This formula returns a value of **2** since only two cells in the **Team** column have the text “Mavs” with the case matching.

**Note**: This formula is able to perform a case-sensitive count because the **REGEXMATCH** function in Google Sheets is case-sensitive by default.

**Additional Resources**

The following tutorials explain how to perform other common operations in Google Sheets:

Google Sheets: How to Use COUNTIF From Another Sheet

Google Sheets: How to COUNTIF Not Equal to Text

Google Sheets: COUNTIF Greater Than But Less Than Some Number