Excel Office

Excel How Tos, Tutorials, Tips & Tricks, Shortcuts

Replace one character with another in Excel

To replace or substitute all occurrences of one character with another character, you can use the SUBSTITUTE function.

Formula

=SUBSTITUTE(ref,old,new)

Explanation

In the example shown, the formula in C6 is:

=SUBSTITUTE(B6," ","-")

How this formula works

The SUBSTITUTE function is full automatic. All you need to do is supply “old text” and “new text”. SUBSTITUTE will replace every instance of the old text with the new text.

Also See:   SUBSTITUTE function vs REPLACE function in Excel

If you need to perform more than one replacement at the same time, you’ll need to nest multiple SUBSTITUTE functions. See the “clean telephone numbers” example linked below.

Leave a Reply

Your email address will not be published. Required fields are marked *