The original text string containing the text to be replaced
Old_text
-
The text to be found and replaced by New_text
New_text
-
The new text that is used to replace the Old_text
[Instance_Num]
-
An optional argument which specifies which occurrence of Old_text should be replaced by the New_text.
If Instance_Num is specified, just that instance of the Old_text is replaced;
Otherwise, all instances of Old_text are replaced with the New_text
Note that the Excel Substitute function is similar to the
Excel Replace Function,
but the Substitute function replaces one or more instances of a given text string, while the
Replace function replaces text in a specified position of a supplied string.
Example
The spreadsheets on the right show examples of use of the Excel Substitute Function.
The spreadsheet at the top shows the format of the functions and the spreadsheet below shows the results.