Microsoft Office Tutorials and References
In Depth Information
Using the COUNTIF Function
Using the COUNTIF Function
The Excel COUNT and COUNTA functions are useful for basic counting, but sometimes you need
more flexibility. This tip contains many examples of the powerful Excel COUNTIF function, useful
for counting cells based on various types of criteria.
These formulas all work with a range named Data, so you need to adjust the formulas to refer to
your own range. As you can see in Table 115-1, the criteria argument proves quite flexible. You
can use constants, expressions, functions, cell references, and even wildcard characters (* and ?).
Table 115-1: COUNTIF Formulas
Number of Cells or Values It Returns
Cells containing the value 12
Cells containing a negative value
Cells not equal to 0
Cells greater than 5
Cells equal to the contents of cell A1
Cells greater than the value in cell A1
Cells containing text
Text cells containing exactly three characters
Cells containing the single word budget and nothing
else (not case sensitive)
Cells containing the text budget anywhere within the
text (not case sensitive)
Cells containing text that begins with the letter A (not
case sensitive)
Cells containing the current date
Cells with a value greater than the average
Values exceeding three standard deviations above the
=COUNTIF(Data,3)+COUNTIF(Data,-3) Cells containing the value 3 or –3
Cells containing logical TRUE
Cells containing a logical value (TRUE or FALSE)
Cells containing the #N/A error value
Search JabSto ::

Custom Search