MindFusion.Wpf Pack Programmer's Guide
COUNTIF

Counts the number of cells in the specified range that meet the specified criterion.

Syntax  Copy Code

COUNTIF( Reference r, Criterion c ) Integer

Parameters

r
Required. A reference that identifies the cells to count.
c
Required. A number or text value that defines which cells to count. For example, ">10", "products", "5".

Remarks

The criterion can be a number or a text value. If c is a number, the cells are counted if they contain numbers equal to the criterion or text values equal to the text representation of the criterion. If c is a string that starts with a comparison operator ('<=', '<>', '<', '>=', '>', '=') the cell values are counted if they satisfy the condition of the criterion. For example, the cell with value 10 will be counted if c is '<15'. Cells with text values cannot satisfy criteria with the following comparison operators: '<=', '<', '>', and '>='. Text comparison is case-insensitive.

Criteria can contain wildcard characters - the question mark (?) and the asterisk (*). A question mark matches any single character, and an asterisk matches any sequence of characters. To match blank cells use blank or empty criteria.

Example

Formula  Copy Code

=COUNTIF(A1:A5,">50")
=COUNTIF(A10:I15,"us*")

See Also

Function Reference
COUNT Function
COUNTA Function
COUNTIF Function