Excel Digest

  Excel help for the rest of us

05 Sep

How to use the COUNTIF function

The COUNTIF function counts the number of cells within a given range that meet a given criteria.

Syntax
COUNTIF(range,criteria)

Range: The range of cells from which you want to count cells.

Criteria: The criteria upon which you want to base your count. It defines which cells will be counted.
The criteria can b a number, expression, cell reference, or a text.

Examples:

=COUNTIF(B15:B33;”>100″)
=COUNTIF(A1:A8;”ABC”)

The examples below show how to use COUNTIF with numeric values. A1 to A6 is our data range. In rows 7, 8 and 9 you have the text of the formula  in column A (for explanation only), the actual formula in column B and column C shows which cells are qualified to be counted.

COUNTIF and wildcards

You can use the wildcard characters question mark (?) and asterisk (*) in the COUNTIF criteria. A question mark matches any single character; an asterisk matches any sequence of characters.

Examples:

The examples below show how to use COUNTIF with wildcards. A1 to A11 is our data range. In rows 12, 13, 14, 15 and 16 you have the text of the formula  in column A (for explanation only),  the actual formula in column B, and column C shows which cells are qualified to be counted.

Note:

If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

Print This Post Print This Post

Related Posts

   
Count numbers greater than or less than a number 
Count how often a value occurs within a range 
Count how often a value occurs - multiple criteria 

Leave a Reply

© 2008 Excel Digest | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo