COUNTIF

Counts the number of elements in an array that meet the specified condition

Syntax

=COUNTIF(array, expression)

Arguments

ArgumentTypeDescription
arrayArrayAny value to count, which can be an array, reference or a single value
expressionBooleanThe expression to evaluate for each item in the flattened array, to determine whether it should be counted or not

Examples

=COUNTIF(ARRAY(1,2,3), this > 2)1
Counts the number of arguments in the array (1, 2, and 3) which are greater than 2.

=COUNT(children, this."Property 1" > 2)4
Counts the number of children on the current shape whose shape data property "Property 1" is greater than 2.