Counts the number of times a keyword appears in values. values: Specifies where to look for data. Supports array or text type data. keyword: The keyword to search for and count. operation: Comparison operator, optional. You can enter condition symbols greater than ">", less than "<", equal to "=", not equal to "!=". If not filled, the default is equal to. In example one, no comparison operator is filled, so it counts the number of values equal to "A". In example two, the comparison operator ">" is filled, meaning it counts the number of values greater than "2". Use cases: 1) It can count the number of times the character "A" appears in a text array [A, B, C, D, A], as shown in example one. 2) It can count the number of numbers greater than 3 in a number array [1, 2, 3, 4, 5], as shown in example two. 3) It can count the number of times "grape" appears in a text string "Eat grapes without spitting out the skins", as shown in example three.
Input formula
Select a formula
Number
Sum
Average
Max
Min
Round
Round Up
Round Down
Ceiling
Floor
Even
Odd
Int
Abs
Sqrt
Mod
Power
Exp
Log
Value
Text
Concatenate
Find
Search
Mid
Replace
Substitute
Len
Left
Right
Lower
Upper
Rept
T
Trim
Encode URL Component
Logic
If
Switch
True
False
And
Or
Xor
Blank
Error
Is Error
Not
Date
Today
Now
To Now
From Now
Date Add
Datetime Diff
Workday
Workday Diff
Is After
Is Before
Is Same
Datetime Format
Datetime Parse
Datestr
Timestr
Year
Month
Weekday
Weeknum
Day
Hour
Minute
Second
Set Locale
Set Timezone
Created Time
Last Modified Time
Array
Array Compact
Array Unique
Array Join
Array Flatten
Count
CountA
CountIf
CountAll
Object
Record ID
Counts the number of times a keyword appears in values. values: Specifies where to look for data. Supports array or text type data. keyword: The keyword to search for and count. operation: Comparison operator, optional. You can enter condition symbols greater than ">", less than "<", equal to "=", not equal to "!=". If not filled, the default is equal to. In example one, no comparison operator is filled, so it counts the number of values equal to "A". In example two, the comparison operator ">" is filled, meaning it counts the number of values greater than "2". Use cases: 1) It can count the number of times the character "A" appears in a text array [A, B, C, D, A], as shown in example one. 2) It can count the number of numbers greater than 3 in a number array [1, 2, 3, 4, 5], as shown in example two. 3) It can count the number of times "grape" appears in a text string "Eat grapes without spitting out the skins", as shown in example three.
Usage
COUNTIF(array, condition)
Example
COUNTIF({Rating}, "A")
=> 2