Skip to main content

SUBSTITUTE function

The SUBSTITUTE function is one of the text and data functions. Is used to replace a set of characters with a new one.

Syntax​

SUBSTITUTE(text, old_text, new_text, [instance_num])

The SUBSTITUTE function has the following arguments:

ArgumentDescription
textThe string to perform the substitution within.
old_textThe string to replace.
new_textThe string to replace with.
instance_numThe number of occurences to repleace. It is an optional argument, if omitted, the function will replace all the occurences within text.

Notes​

How to apply the SUBSTITUTE function.

Examples​

The figure below displays the result returned by the SUBSTITUTE function.

SUBSTITUTE Function