COUNTIF is an Excel function which allows for the counting of values in a range where the values meet a criterion.
Microsoft describes the syntax so:
COUNTIF(range, criteria)
The COUNTIF function syntax has the following arguments:
• Range Required. One or more cells to count, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.
• Criteria Required. A number, expression, cell reference, or text string that defines which cells will be counted. For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".Note
o You can use the wildcard characters - the question mark (?) and the asterisk (*) - in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
o Criteria are case insensitive; for example, the string "apples" and the string "APPLES" will match the same cells.
COUNTIF has been appreciated for checking whether a value is present in a list of values (Super User).
The COUNTIFS function, introduced with Excel 2007, allows for multiple criteria and ranges within a single function, though more than one COUNTIF may be combined to similar effect.