Skip to main content
Version: Streamsheets 3.0

SUBSTITUTE

Substitutes a text string with a new text.

Syntax

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

Arguments

NameTypeDescription
TextStringText for which to substitute characters.
OldTextStringThe text to be replaced.
NewTextStringThe text which will replace specified OldText.
Occurrence (optional)NumberSpecifies which occurrence of OldText to be replaced by NewText. If not specified every occurrence of OldText will be replaced.

Return

TypeDescription
NumberA string value with replaced text.

Examples

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