WHAT DOES COUNTIF DO

The COUNTIF function counts how many cells in a range match a single condition. It’s useful for quick summaries like how many sales are above a threshold or how many orders came from a region.

If you need multiple conditions, use COUNTIFS.

WHEN TO USE IT
  • You want to count how many cells match one condition
  • Your data is arranged in columns (e.g. Region, Product, Quantity)
  • You want a simple filter without extra steps or helper columns
FORMULA SYNTAX
COUNTIF(range, criteria)
ArgumentDescription
rangeThe group of cells to check
criteriaThe condition to apply, like "West" or ">100"
EXAMPLE 1: COUNT ORDERS FROM THE WEST REGION

We want to count how many orders came from the West.

AB
1RegionProduct
2WestA
3EastB
4WestA
5WestB
=COUNTIF(A2:A5, "West")

Result: 3 (rows 2, 4, and 5)

EXAMPLE 2: COUNT ORDERS GREATER THAN $100

We want to count how many orders are greater than $100.

AB
1CustomerAmount
2Alice120
3Bob90
4Carol180
5David60
=COUNTIF(B2:B5, ">100")

Result: 2 (rows 2 and 4)

COMMON PITFALLS AND EDGE CASES
  • Text and logical operators must be in quotes — e.g. ">100", "West"
  • Use "<>" to count non-blank or “not equal” values
  • Wildcards are supported: "*" for any characters, "?" for one character
  • Only one condition allowed — use COUNTIFS if you need more
RELATED FUNCTIONS
FURTHER READING

Official Microsoft documentation:
COUNTIF – Microsoft Support