The COUNTIF() function counts the number of items in a text field or text value that meet a given criterion, and returns a number. It is designed to analyze lists of values (tags, emails, identifiers...) separated by a specific character.
Without an operator (CONTAINS, >, etc.), the criterion matches an exact equality. Use CONTAINS for a partial match. The function is not case-sensitive.
Syntax
The third parameter is optional: without it, the comma is used as the separator.
COUNTIF(values, criteria)
COUNTIF(values, criteria, separator)
Calling function parameters in TimeTonic:
-
$field_name= field (link, linked table column, number, selection, formula, text...). - "free text" = free text to be added between quotation marks.
- Do not use quotation marks for numbers.
Parameters
Examples
Searching for an email domain
COUNTIF("a@timetonic.com, b@timetonic.com, c@gmail.com", "CONTAINS timetonic.com")
Result: 2
Exact match
COUNTIF("Urgent, In progress, Pending", "Urgent")
Result: 1
Using a numeric operator
COUNTIF("101 205 301 50", ">100", " ")
Result: 3
Counting empty values
COUNTIF("a,, c, d, e", "EMPTY")
Result: 1
Counting non-empty values
COUNTIF("a,, c, d, e", "NOT EMPTY")
Result: 4
Your formula returns 0 or stays empty
If the result is not what you expected, check these points.
Go further
SUM()
Add up several columns, instead of counting items.
Or continue with
Formula glossary
All available operators and functions, sorted by category.