Examples
ENDSWITH("aBc", "a")
: FALSE (a
occurs, but not at the end)
ENDSWITH("aBc", "bc")
: TRUE
ENDSWITH("aBc", "D")
: FALSE (D
does not occur)
ENDSWITH("I'm bored!", "Red")
: FALSE (red
occurs, but not at the end)
ENDSWITH([Email], "@gmail.com")
answers the question: does the Email contain a GMail address? Functionally equivalent to but more efficient than ("gmail.com" = INDEX(SPLIT([Email], "@")), 2)
. See also: INDEX(), SPLIT().
Syntax
ENDSWITH( haystack , needle )
Arguments
haystack (any) : The text value in which the text fragment (needle) is to be sought.
needle (any) : The text fragment to find in search value (haystack).
Return Value
Yes/No : TRUE if the fragment (needle) is found at the end of the search value (haystack). Note that the search is case-insensitive: upper- and lower-case letters are equivalent.