Skip to main content
Version: Streamsheets 2.5

SUBSTITUTE

Substitutes a text string with a new text.

Syntax

=SUBSTITUTE(Text, OldText, NewText, [Occurrence])

Arguments

NameDescription
TextText for which to substitute characters.
OldTextThe text to be replaced.
NewTextThe text which will replace specified OldText.
Occurrence (optional)Specifies which occurrence of OldText to be replaced by NewText. If not specified every occurrence of OldText will be replaced.

Return

A string value with replaced text.

Examples

FormulaResultComment
=SUBSTITUTE("Replace me now", "now", "later")
"Replace me later"