The SUBSTITUTE function replaces text in a given string by matching. SUBSTITUTE is case-sensitive and does not support wildcards.
Purpose of Excel SUBSTITUTE Function
Replace text based on content.
Return value
The processed text.
Syntax
=SUBSTITUTE (text, old_text, new_text, [instance])
Arguments
Arguments | Description | Remarks |
text | The text to change | Mandatory |
old_text | The text to replace | Mandatory |
new_text | The text to replace with | Mandatory |
instance | The instance to replace. If not supplied, all instances are replaced | Optional |
Usage notes
- SUBSTITUTE finds and replaces old_text with new_text in a text string.
- Instance limits SUBSTITUTE replacement to one particular instance of old_text.
- Use SUBSTITUTE to replace text based on content.
- Use the REPLACE function to replace text based on its location.
- SUBSTITUTE is case-sensitive and does not support wildcards.
Availability
Since 2007 for Windows.
Since 2011 for Mac.