Count cells that contain five characters

Count cells that contain five characters

Related Functions

Sponsored Link

=COUNTIF(rng,"?????")

If you need to count the number of cells that contain a certain number of characters text, you can easily do so with the COUNTIF function. In the generic form of the formula (above), rng is a range of cells, and “?” is a wildcard matching any single character.

In the example, the active cell contains this formula:

 
=COUNTIF(B4:B9,"?????")

Here’s how the formula works:

COUNTIF counts the number of cells in the range that contain five characters by matching the content of each cell against the pattern “?????”, which is supplied as the criteria for COUNTIF. The “?” symbol is a wildcard in Excel that means “match any single character”, so this pattern will count cells that contains any five characters. The count of cells that match this pattern is returned as a number which, in the example, is the number 2.

 

 

Sponsored Link

0 votes. 0 / 5

Excel - Excel Functions - Excel Formulas
Logo