Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Function Reference : Spread Functions : Special Functions : COUNTIF
Q10672 - INFO: COUNTIF

COUNTIF returns the count of cells that meet the condition specified by Condition and Limit.

SYNTAX:

COUNTIF(Condition, Limit, Cell Range):

Condition:  The logical operator to test with:

  • For Numeric Comparisons: "<", "<=", "=", "<>", ">", ">="
  • For Text Comparisons: "<", "<=", "=", "<>", ">", ">=","CS.=","CS.<>","STARTS","CS.STARTS","ENDS","CS.ENDS","CONTAINS","CS.CONTAINS"

CS stands for Case Sensitive.  See Text examples below.

Limit: Value to compare cell values to.

CellRange: The cell range to anaylze. i.e. (A1:A31)

 

NOTES:

Also known as Conditional Count.

Cells that contain non-numeric data are evaluated as a zero (0) for comparison to the limit. This includes cells that contain entries with symbols (<4, ND, etc...).

EXAMPLES:

Numeric Comparison Examples:

CountIF(">",1,C4:C34) Count the number of values in the cell range C4:C34 that are greater than (>) the limit 1.

CountIF("<", 6,C4:C34) Count the number of values in the cell range C4:C34 that are less than (<) the limit 6.

Download Example Template: Help_COUNT_COUNTIF.SS3 (Click here for download instructions)

Text Comparison Examples:

=COUNTIF("=","RAINY",C3:C33) - Returns the count of values in the cell range that is equal to "RAINY".  Since CS (Case Sensitive) is not specified, will count rainy, Rainy, RAINY, RaInY...

=COUNTIF("STARTS","Sun",C3:C33) - Returns the count of values that start with "Sun" (i.e. the first 3 characters are sun regardless of case).

=COUNTIF("CS.CONTAINS","CLOUD",C3:C33) - Returns the count of values that contain the text CLOUD.  Since CS is specified, text must match the case (i.e. only cells with upper case CLOUD would be counted).   

See Also:  GCC, COUNT

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 1/27/2008 10:39 AM.
Last Modified on 5/30/2018 4:03 PM.
Last Modified by Scott Dorner.
Article has been viewed 4444 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article