listValueCount

Counts instances of a specified value in a list. The search is
case-sensitive.

listValueCount(list, value [, delimiters]) → returns Numeric

listValueCount Argument Reference

list
Required

value
Required

delimiters
Default: ,

Values:
  • ,
  • |
  • ;
  • chr(9)
  • chr(10)
  • chr(13)

Examples sample code invoking the listValueCount function


Simple Example

Counts instances of 'foo' in the list

listValueCount("foo,bar,lorem,foo,ipsum", "foo")

Expected Result: 2


Example with Custom Delimiter

Counts instances of 'foo' in the list with a custom delimiter

listValueCount("bar|foo|lorem,ipsum|me|foo,something|foo|FOO", "foo", "|")

Expected Result: 2


Fork me on GitHub