COUNTIFDEEP

Recursively counts the number of elements in the specified array which satisfy the given condition.

Syntax

=COUNTIFDEEP(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

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

=COUNTIFDEEP(ARRAY(ARRAY(4, 5), 6), this > 4)2
Counts the number of arguments in the flattened array (4, 5, and 6) which is greater than 4.