Quick, clean, and to the point

Excel COUNTIF Function

Excel COUNTIF function

COUNTIF is a function to count cells that meet a single criteria. COUNTIF can be used to count cells with dates, numbers, and text that match specific criteria. The COUNTIF function supports logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.

Count cells that match criteria
Return value 
A number representing cells counted.
=COUNTIF (range, criteria)
  • range - The range of cells to count.
  • criteria - The criteria that controls which cells should be counted.
Usage notes 

The COUNTIF function in Excel counts the number of cells in a range that match the supplied criteria

Non-numeric criteria needs to be enclosed in double quotes but numeric criteria does not:

=COUNTIF(A1:A10,100) // count cells equal to 100
=COUNTIF(A1:A10,">32") // count cells greater than 32
=COUNTIF(A1:A10,"jim") // count cells equal to "jim"
=COUNTIF(A1:A10,"<"&B1) // count cells less than value in B1

The wildcard characters ? and * can be used in criteria. A question mark matches any one character and an asterisk matches any sequence of characters.

To find a literal question mark or asterisk, use a tilde (~) in front question mark or asterisk (i.e. ~?, ~*).

See links on this page to more examples with detailed explanations.

Excel Formula Training

Formulas are the key to getting work done in Excel. In this accelerated video course, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn powerful skills to troubleshoot, trace errors, and fix problems. This is the formula training you should have had to begin with. See details here.

Thank you so much Dave, this is going to save me hours of work.
Excel foundational video course
Excel Pivot Table video training course
Excel conditional formatting video course
Excel formulas and functions video training course
Excel Shortcuts Video Course