# COUNTIF

The `COUNTIF` formula counts the number of cells within a specified range that meet a certain criterion. This formula is commonly used to count cells that meet a specific condition or criteria.

## Usage

Use the `COUNTIF` formula with the syntax shown below, it has 2 required parameters:

Parameters:
1. range (required):
The range of cells to count.
2. criterion (required):
The condition or criteria used to determine which cells to count.

## Examples

Here are a few example use cases that explain how to use the `COUNTIF` formula in Google Sheets.

### Counting cells that meet a specific criteria

You can use `COUNTIF` to count cells that meet a specific criteria, such as counting the number of cells that contain a specific word or value.

### Counting cells that fall within a certain range

You can use `COUNTIF` to count cells that fall within a certain range, such as counting the number of cells that contain a value between two numbers.

### Counting cells based on multiple criteria

You can use `COUNTIF` to count cells based on multiple criteria, such as counting the number of cells that contain a specific word or value in one column and a different word or value in another column.

## Common Mistakes

`COUNTIF` not working? Here are some common mistakes people make when using the `COUNTIF` Google Sheets Formula:

### Incorrect range format

One common mistake is to use an incorrect range format. The range must include the cells to be counted, for example A1:A10. Make sure the range is valid and includes the cells you want to count.

### Incorrect criterion format

Another mistake is to use an incorrect criterion format. The criterion is the condition to be met, for example '>5'. Make sure the criterion is valid and matches the values in the range.

### Mismatched range and criterion

A common mistake is to use a range and criterion that do not match. For example, if the range contains text and the criterion is a number, the formula will not work. Make sure the range and criterion match.

### Wrong function name

Another mistake is to use the wrong function name. Make sure you are using the COUNTIF function and not a similar function like COUNT or SUMIF.

### Missing or extra parentheses

A common mistake is to forget a parenthesis or add an extra one. Make sure the formula has the correct number of parentheses and they are in the right place.

The following functions are similar to `COUNTIF` or are often used with it in a formula:

• `COUNTIFS`

The `COUNTIFS` function counts the number of cells in a range that meet multiple criteria. It is commonly used to analyze data sets and filter out specific information based on selected criteria.

• `SUMIF`

The `SUMIF` formula is used to add up values in a range that meet a specific criterion. It can be used to sum values based on text, numbers, or dates. The formula is most commonly used in financial analysis, budgeting, and data analysis.

• `AVERAGEIF`

The `AVERAGEIF` function calculates the average of a range of cells that meet a specified criteria. It is commonly used when working with large datasets to quickly calculate the average of a subset of data. The function takes a range of cells to evaluate (criteria_range), a string or value to compare against (criterion), and an optional range of cells to average (average_range). If the average_range is not specified, the function will use the same range as the criteria_range.

You can learn more about the `COUNTIF` Google Sheets function on Google Support.