ENDSWITH()

Does text end with fragment?

Returns a Yes/No expression, as follows:

  • TRUE if the text fragment is found at the end of the search value.
  • FALSE if the text fragment is not found at the end of the search value.

Note: The search is case-insensitive; upper- and lower-case letters are equivalent.

Sample usage

ENDSWITH("aBc", "a") returns FALSE (a occurs, but not at the end)

ENDSWITH("aBc", "bc") returns TRUE

ENDSWITH("aBc", "D") returns FALSE (D does not occur)

ENDSWITH("I'm bored!", "Red") returns 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(haystackneedle)

  • haystack - Any text value in which the text fragment (needle) is to be sought.
  • needle - Any text fragment to find in search value (haystack).

See also

FIND()

IN()

LEFT()

RIGHT()

STARTSWITH()

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
false