3.5.3.4 Countif

Description

This function is used to count the number of values that satisfies a specified condition.

Syntax

 double Countif(vector vd, string con$)

Parameters

vd

is a vector in which you want to count the number.

con$

is the condition you use to find a sub-range. Double quotation ("") must be added for the condition.

Return

Return the count of values that satisfied the condition con$.

Example

newbook;
col(A) = data(1,32);
countif(col(A),"col(A) > 5 && col(A) < 10")=;//should return 4


See Also

Sumif, Averageif