Returns the number of cells in a specified table that match the specified condition.
CountIf([Table], [Condition Expression], [Ignore Whitespace] )
Where:
Table is the table within which the cells are to be counted
Condition Expression is the search condition that when matched will count the cells
Ignore Whitespace (optional) is True to ignore leading/trailing whitespace characters in text strings, in the condition, otherwise False.
Rule | Meaning |
---|---|
CountIf(PeopleTable,"=Male ", True) | Counts the number of cells in the people table that equal Male. Will remove the whitespace, before the last ". |
Range | Criteria | Result of the CountIf function |
---|---|---|
PeopleTable | "=Male " | 3 |
PeopleTable | "<50" | 6 (2 from the ID column and 4 from the Age column) |
PeopleTable
Member ID | Name | Age | Gender |
---|---|---|---|
42 | Dave Sharp | 25 | Male |
44 | Joe Bloggs | 37 | Male |
96 | Sandra Shield | 42 | Female |
107 | Thomas Knight | 21 | Male |
251 | Isabelle Jones | 56 | Female |