The Klipfolio SUBSTITUTE function replaces a set of characters with another set of characters in a text string.
While the SUBSTITUTE function is similar to the REPLACE function, the SUBSTITUTE function is used to replace part of a value.
The syntax for the SUBSTITUTE function is:
SUBSTITUTE( text , old text, new text , occurrence )
|text||The character(s) to be manipulated.||text||vector|
|old text||The character(s) that will be replaced.||text||vector|
|new text||The character(s) that are to replace the character(s) in old text.||text||vector|
Optional: Indicates the instance that will be replaced.
If the parameter is omitted every occurrence is replaced with the character(s) in new text.
Let's look at some SUBSTITUTE function examples.
The following examples are based on text from an Excel spreadsheet:
SUBSTITUTE ( A:A , "/" ,"-" )
SUBSTITUTE ( A1 , "/" ,"-" , 2 )