It searches for a specific text in string and replaces it with another. It is a case-sensitive function.
The syntax of the function is the following:
SUBSTITUTE(text, old_text, new_text, [instance_num])
text: The text for which we want to replace a part.
old_text: The text you want to find and replace.
new_text: The text that will replace the old_text.
instance_num: Optional. If you specify this argument, then if more instances of the old_text exist inside the text then only the instance specified by this argument is replaced. If it is not specified then all the instances of the old_text are replaced by the new_text.
Click on the button to practice using this function, with the help of our Online Assessment Tool:
Here is an example of how to use the SUBSTITUTE function:
In column C show the text of the respective cells of column A, replacing the word name with the respective names of column B.