# COUNTIF Function

The COUNTIF function is one of the statistical functions. It is used to count the number of the selected cells based on the specified criterion.

The COUNTIF function syntax is:

COUNTIF(cell-range, selection-criteria)

where

cell-range is the selected range of cells you wish to count applying the specified criterion,

selection-criteria is a criterion you wish to apply entered manually or included into the cell you make reference to.

Note: selection-criteria can include the wildcard characters — the question mark (?) that matches a single character and the asterisk (*) that matches multiple characters. If you want to find a question mark or asterisk, type a tilde (~) before the character.

To apply the COUNTIF function,

1. select the cell where you wish to display the result,
2. click the Insert Function icon situated at the top toolbar,
   or right-click within a selected cell and select the Insert Function option from the menu,
   or click the icon situated at the formula bar,
3. select the Statistical function group from the list,
4. click the COUNTIF function,
5. enter the required arguments separating them by commas,
6. press the Enter button.

The result will be displayed in the selected cell.