COUNTIF is a logical test applied to a whole column. Instead of asking “is this customer married?” for one row, you ask Excel “how many customers are married?” in one formula. It is one of the functions people search for most, because the criterion must be written in a special way: between quotes, as a number, or as a cell reference.
The following exercise shows you every way to write the criterion of COUNTIF.
What you will practice in this exercise
You work on a customer file. You answer 6 questions, one formula per question:
- Count the married customers (criterion as text)
- Count with a cell reference (criterion in a cell)
- Count by a numeric value (criterion as a number)
- Count the zeros (the value 0)
- Count the empty cells (blank criterion)
- Count with another cell reference
Practice with exercises
Related articles
All the exercises in this series are based on real cases found on Excel forums. Each one answers a question that Excel users really ask.