# COUNTIF Function

> Count the cells that meet one condition with the COUNTIF formula function of TX Sheet Control: numbers, text, comparison operators and wildcards.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > COUNTIF Function
- **227 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/countif/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/countif/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/countif/llms-full.txt

---

Count the cells of a range that meet a condition. `range` is the range to check and `criteria` the condition: a number or a text to match, such as `2` or `"North"`, or a comparison in quotation marks, such as `">20000"`, or `"<>"` for cells that are not empty. Text comparisons ignore case, and a text criterion can use the wildcards `?` for any single character and `*` for any sequence of characters.

### Syntax

```text
COUNTIF(range, criteria)
```

Category: Conditional. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=COUNTIF(B4:D6,">20000")
```

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [COUNTBLANK Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/countblank/llms-full.txt)
- **Next:** [COUNTIFS Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/countifs/llms-full.txt)
