COUNTIF Formula for Text and Numbers (Exact Match)
The COUNTIF function formula that counts text values matching a specified criterion is:
Cells containing an exact string of text:= COUNTIF( D8:D17,” Mark”).
So, you enter:
- A range is the first parameter;
- A comma as the delimiter;
- A word or several words are enclosed in quotes as the criteria.
You can also use a reference to any cell containing that word or words and get absolutely the same results, such as =COUNTIF(D8:D17, D9)
Similarly, COUNTIF formulas work for numbers. The below formula perfectly counts cells with quantity 71 in Column E.
=COUNTIF(E8:E17, 71)
Excel COUNTIF Function
The COUNTIF function in Excel is used to count the number of cells that match a single condition applied. It can include Dates, Numbers, and Texts. It uses various logical operators like <(Less Than), >(Greater Than), >=(Greater Than or Equal to), <=(Less Than or Equal to), =(Equals to), and <>(NOT) for matching the condition. It also uses some wildcards like * and ? for partial matching.