
Finds specific text inside a string and replaces it with something else.
The Excel SUBSTITUTE function replaces specific text inside a string. You tell Excel what text to find and what to replace it with, and the function returns the updated result.
That makes SUBSTITUTE different from REPLACE. REPLACE works by position, while SUBSTITUTE works by matching text content. If you know the word, symbol, or substring you want to change, SUBSTITUTE is often the better tool.
SUBSTITUTE is especially helpful in cleanup work because it targets the actual text you want to change instead of relying on a fixed position. That makes it useful for removing symbols, normalizing separators, or replacing only one chosen occurrence when the rest of the text should stay untouched.
Finds matching text and replaces it with new text.
Returns the original string with the matched text replaced.
=SUBSTITUTE(text, old_text, new_text, [instance_num])
text is the source string. old_text is what you want to find. new_text is what should replace it. instance_num is optional and lets you replace only one matching occurrence instead of all of them.
"" to remove the matched text.Use SUBSTITUTE when you know what text should change. Use REPLACE when you know where the change should happen.
| Function | Works By | Use When |
|---|---|---|
SUBSTITUTE |
Matching text content | You know what text to replace |
REPLACE |
Character position | You know where the replacement starts |
LOWER / UPPER |
- | You need to normalize case before a case-sensitive replacement |
SUBSTITUTE is useful when the same word, symbol, or separator appears in many rows and needs to be changed consistently. Because it works by content, you do not have to calculate character positions first.
It is also useful for cleaning text. If you replace a character with an empty string, that character is removed. This is a common pattern for stripping spaces, hyphens, or other unwanted symbols.
"" as the replacement text when you want to remove something entirely.If the old year is known, SUBSTITUTE can replace it directly without needing to know where it sits in the string.
=SUBSTITUTE(A2, "2021", "2024")
// "Excel-2021" -> "Excel-2024"
In cell B1, update the year text in the label row.
The optional instance_num argument is useful when the same character appears several times but only one match should change. If you omit it, all matches are replaced.
=SUBSTITUTE(A3, "-", "B", 2)
// "A-A-A" -> "A-BA"
In cell B2, replace only one occurrence in the repeated-separator row.
If the replacement text is empty, SUBSTITUTE removes the matched text. This is a common way to strip unwanted symbols from imported values.
=SUBSTITUTE(A2, "-", "")
// "Excel-2021" -> "Excel2021"
In cell B3, remove the separator from the label row.
SUBSTITUTE can also convert one separator style into another. This is useful when data needs to be prepared for a different format or system.
=SUBSTITUTE(A2, "-", "/")
// "Excel-2021" -> "Excel/2021"
In cell B4, swap the separator character in the label row.
SUBSTITUTE is case-sensitive. If you search for "excel", it will not match "Excel". If the source data uses inconsistent capitalization, normalize it first or use another approach.
SUBSTITUTE is useful when you know exactly which word, character, or symbol needs to change. In this lesson, it handled label updates, one specific match, full removal, and separator changes without needing position numbers.
That makes it a handy cleanup tool for everyday text work. Just remember that it matches text directly and it is case-sensitive, so Excel only changes what truly matches your old_text.
SUBSTITUTE replaces text by matching content.=SUBSTITUTE(text, old_text, new_text, [instance_num]).Tell your friends about this post