In Excel: use =SUBSTITUTE(text, old_text, new_text) — it finds a piece of text by its content and swaps every occurrence for new text, or just the Nth occurrence if you add a fourth argument.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
text | required | The text or cell whose content you want to change. |
old_text | required | The piece of text to find and replace, matched by its content. |
new_text | required | The text to put in place of old_text; use "" to remove old_text entirely. |
instance_num | optional | Which occurrence to replace (1 = first, 2 = second, …); omit to replace every occurrence. |
Related functions
In an empty cell type =SUBSTITUTE( and click the cell holding the text, such as A2.
Type a comma, then in quotes the text to find — for example "-" for a hyphen or CHAR(160) for a non-breaking space.
Type a comma, then the replacement text in quotes; use "" to delete the found text entirely.
Optionally add a comma and a number to replace only that occurrence (1 for the first, 2 for the second, and so on).
Close the bracket, press Enter, and fill the formula down the column.
What this does
SUBSTITUTE replaces text by CONTENT: you tell it the characters to look for and what to put in their place, and it swaps every match in the string. This is the key difference from REPLACE, which works by POSITION (a start point and a length) rather than by what the text actually says. Common uses are stripping a character by replacing it with "" (an empty string), swapping one word for another, and removing the non-breaking space CHAR(160) that breaks lookups. An optional fourth argument, instance_num, limits the swap to a single occurrence. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “substitute multiple values”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a text operation that turns messy entries into clean, usable data, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Cell A2 holds the phone number "+49-30-1234-5678". To strip every hyphen: =SUBSTITUTE(A2, "-", "") returns "+493012345678". To swap a word in B2 ("Annual Report") for another: =SUBSTITUTE(B2, "Annual", "Quarterly") returns "Quarterly Report". To replace only the second space in "one two three", add the instance: =SUBSTITUTE("one two three", " ", "_", 2) returns "one two_three". SUBSTITUTE is the go-to for content-based cleanup — stripping symbols, swapping words, and removing stray CHAR(160) spaces — whenever you know what the text says rather than where it sits. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. For “substitute multiple values”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Reaching for
SUBSTITUTEwhen you mean to replace by position —SUBSTITUTEmatches content; to overwrite characters at a known spot use REPLACE instead. - Forgetting that the match is case-sensitive: "Cat" and "cat" are treated as different, so the wrong case will not be swapped.
- Omitting instance_num and replacing every occurrence when you only wanted one — add the fourth argument to target a single match.
Frequently asked questions
What is the difference between SUBSTITUTE and REPLACE?
SUBSTITUTE finds text by its content and swaps matching characters, while REPLACE overwrites a fixed number of characters at a position you give it. Use SUBSTITUTE when you know what the text says, REPLACE when you know where it sits.
How do I remove a character from a cell?
Substitute it with an empty string: =SUBSTITUTE(A2, "-", "") deletes every hyphen. The same pattern strips spaces, slashes, or the non-breaking space CHAR(160) with =SUBSTITUTE(A2, CHAR(160), "").
Is SUBSTITUTE case-sensitive?
Yes. It only swaps text that matches the case of old_text exactly, so "USD" and "usd" are different. To ignore case you would first standardise the text with UPPER or LOWER.
Other ways people ask this
This is also commonly searched as “excel filtering multiple values” and “excel substitute multiple strings”. They describe the identical operation, so you are in the right place no matter how you phrased it.
Why do people search for this in so many different ways?
Because the same task has many names. “excel filtering multiple values”, “excel substitute multiple strings” all point at the one operation explained on this page, which is why they all lead here.