Friday, August 12, 2005

COUNTIF Criteria


Microsoft Excel Help has these syntax options for the COUNTIF function

=COUNTIF(A2:A5,"apples") Number of cells with apples in the first column above
=COUNTIF(B2:B5,">55") Number of cells with a value greater than 55 in the second column above


But what if you want to count the number items below or above to a certain value, but that value needed to be flexible and not pasted in the formula as in these two instances? The answer is that the formula can return the count using a criteria found in a cell if entered like this:

=COUNTIF(A1:A12,">"&B10) where B10 is the cell containing the criteria.
Note the quotes around the greater than sign.

Thanks Rembo for this one