SUBSTITUTE()

Text with replacements

Returns the resulting text with the specified text replaced with new text.

Sample usage

SUBSTITUTE("abc", "a", "A") returns Abc

SUBSTITUTE("+1 212-555-1212", "-", ".") returns +1 212.555.1212

SUBSTITUTE("Hello, {}!", "{}", "Bob") returns Hello, Bob!

Syntax

SUBSTITUTE(template, old-text, new-text)

  • template - Any textual type that specifies the text containing occurrences of old-text to be replaced with new-text.
  • old-text - Any textual type that specifies the text to be replaced where found in template.
  • new-text - Any textual type that specifies the text to replace each occurrence of old-text found in template.

See also

CONCATENATE()

CONTAINS()

FIND()

INITIALS()

LEFT()

MID()

RIGHT()

TRIM()

 

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