Examples

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

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

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

Syntax

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

Arguments

  • template (any textual type): The text containing occurrences of old-text to be replaced with new-text.
  • old-text (any textual type): The text to be replaced where found in template.
  • new-text (any textual type): The text to replace each occurrence of old-text found in template.

Return Value

A Text value: the text of template with all occurrences of old-text replaced with new-text.

See Also

CONCATENATE(), CONTAINS(), FIND(), INITIALS(), LEFT(), MID(), RIGHT(), TRIM()

Did this answer your question?