0Pricing
Excel Formulas Academy · Lesson

Replacing Text With SUBSTITUTE

Swap out characters or words inside a string with SUBSTITUTE.

The Need to Replace Text

Data often needs find-and-replace inside formulas: stripping dashes from phone numbers, swapping a word, or removing stray symbols.

The SUBSTITUTE function finds a piece of text inside a cell and replaces every occurrence with new text, all without changing the original cell.

It is the formula-based equivalent of Find & Replace, but it updates automatically as your data changes.

The SUBSTITUTE Syntax

SUBSTITUTE takes up to four arguments:

  • text the original string or cell
  • old_text the text to find
  • new_text the text to put in its place
  • instance_num (optional) which occurrence to replace

The shape is =SUBSTITUTE(text, old_text, new_text, [instance_num]). If you omit the last argument, all occurrences are replaced.

=SUBSTITUTE(A2, "-", "")

All lessons in this course

  1. Merging Text With CONCAT
  2. Joining With Separators Using TEXTJOIN
  3. Changing Case With UPPER, LOWER, PROPER
  4. Replacing Text With SUBSTITUTE
← Back to Excel Formulas Academy