SUBSTITUTE Formula in Excel

“substitute formula in excel” comes up constantly, so this page leads with the exact answer, and only then explains the detail. Everything works in Excel on Windows and Mac and maps almost one-to-one to Google Sheets. Copy the answer above and get back to work, or read on to turn a one-off fix into something you never have to look up again.

Exact answer

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.

Syntax

=SUBSTITUTE(text, old_text, new_text, [instance_num])

Arguments

ArgumentDescription
textrequiredThe text or cell whose content you want to change.
old_textrequiredThe piece of text to find and replace, matched by its content.
new_textrequiredThe text to put in place of old_text; use "" to remove old_text entirely.
instance_numoptionalWhich occurrence to replace (1 = first, 2 = second, …); omit to replace every occurrence.

Related functions

TRIMLEFT/RIGHT/MIDTEXTJOIN
Annotated stepsExcel
1

In an empty cell type =SUBSTITUTE( and click the cell holding the text, such as A2.

2

Type a comma, then in quotes the text to find — for example "-" for a hyphen or CHAR(160) for a non-breaking space.

3

Type a comma, then the replacement text in quotes; use "" to delete the found text entirely.

4

Optionally add a comma and a number to replace only that occurrence (1 for the first, 2 for the second, and so on).

5

Close the bracket, press Enter, and fill the formula down the column.

Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

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. For “substitute formula in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. 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. That is what makes a text operation that turns messy entries into clean, usable data useful in real work: repeatable, auditable, and not dependent on memory or luck.

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. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. If you take one thing from this page on “substitute formula in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.

Common mistakes

  • Reaching for SUBSTITUTE when you mean to replace by position — SUBSTITUTE matches 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

On the way here you may have searched this as “free excel substitute”, “how to use substitute formula in excel” and “excel formula substitute” — it is all the same task, and this page is the single, complete answer to it.

Why do people search for this in so many different ways?

Because the same task has many names. “free excel substitute”, “how to use substitute formula in excel”, “excel formula substitute” all point at the one operation explained on this page, which is why they all lead here.