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(text-to-search, text-to-search-for)

  • text-to-search - Text to be searched.
  • text-to-search-for - Text string to search for in text-to-search.

See also

FIND()

IN()

LEFT()

RIGHT()

STARTSWITH()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu
15375109511146137702
true
Search Help Center
true
true
true
false
false