Averageif-func
This function is used to calculate the mean of values that satisfies a specified condition.
double Averageif(vector vd, string con$)
vd
con$
Return the mean of values that satisfy the condition vcon.
newbook; col(A) = data(1,15); // Based on the literal condition "col(A) > 5 && col(A) < 10" // this should return the average of {6,7,8,9} or 7.5 averageif(col(A),"col(A) > 5 && col(A) < 10")=; // We can also pass the condition as a string variable string strCond$ = "col(A) < 6 || col(A) > 9"; AveVal = averageif(col(A),strCond$); ty $(AveVal);
//simpler condition averageif(col(A), "<10")=;
Sumif, Countif