CONTAINS
Returns true if a property or string contains a value, and returns false otherwise.
Syntax
=CONTAINS(haystack, needle)
Arguments
Argument | Type | Description |
---|---|---|
haystack | String or Array | The value to look for the needle in |
needle | Any | The value to search for in the haystack |
Examples
=CONTAINS("xyz", "x")
→ true
Tests whether the string "x" is contained in the string "xyz".
=CONTAINS("xyz", "a")
→ false
Tests whether the string "a" is contained in the string "xyz".
=CONTAINS("xyz", "vxyz")
→ false
Tests whether the string "vxyz" is contained in the string "xyz".
=CONTAINS(@"Property 1", "abc")
→ true
Tests whether the string "abc" is contained in the shape data property @"Property 1" ("abcdef").
Updated 10 months ago