Using the Excel SUBSTITUTE Function
SummaryThe Excel SUBSTITUTE function is used to substitute next text for old text in a text string. SUBSTITUTE is used to replace specific text within a string. Use REPLACE if you need to replace text that occurs in a specific location within a text string.
Syntax=SUBSTITUTE (text, old_text, new_text, [instance_num])
Required. The text for which you want to substitute new text. Can also be a reference to another cell that contains text.
Required. The text you want to replace.
Required. The text that will replace old_text.
Optional. Specifies which instance of old_text will be replaced with new_text. If the instance is specified, only that instance of old_text will be replaced. If the instance is not specified, every occurrence of old_text will be replaced.
Usage NotesSUBSTITUTE will replace old text with new text. The function is case-sensitive and does not accept wildcard characters.
The instance_num argument can be used to limit SUBSTITUTE's replacement of old_text to a particular instance.