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 ofold-text
to be replaced withnew-text
.
old-text
- Any textual type that specifies the text to be replaced where found intemplate
.
new-text
- Any textual type that specifies the text to replace each occurrence ofold-text
found intemplate
.
See also