# Count cells that begin with in Excel

This tutorial shows how to Count cells that begin with in Excel using the example below;

## Formula

=COUNTIF(range,"text*")

## Explanation

To count the number of cells thatĀ begin with certain text, you can use the COUNTIF function. In the example above “*” is a wildcard matching any number of characters.

In the example, the active cell contains this formula:

=COUNTIF(B4:B11,"app*")

### How thisĀ formula works

COUNTIF counts the number of cells in the range that begin with txt by matching the content of each cell against the pattern “txt*”, which is supplied as the criteria. The “*” symbol (the asterisk) is a wildcard in Excel that means “match any number of characters”. The count of cells that match this pattern is returned as a number.