• Home
  • SUBSTITUTE Function

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

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags