SUBSTITUTE

Replaces sub-texts in a text.

Syntax

SUBSTITUTE(text; oldText; newText; option)

  • text - the text in which to search for oldText - Value type: text

  • oldText - the text which is to be found in parameter text - Value type: text

  • newText - the text with which oldText should be replaced- Value type: text

  • option - defines if the substitution should be done with a regular expression - Value type: constant (optional, default: empty - i.e. plain text replacement)

    Possible values are

    • regex - the replacement should be done using a regular expression for parameter oldText

Remarks

  • The search is performed case-sensitive, so the found text within parameter text must have the same casing than parameter oldText.

  • The text replacement is applied on all texts of the first parameter. If parameters oldText and / or newText contain several cells, the text replacement is applied for each of these cell values.

Examples