Quick, clean, and to the point

Replace one character with another

Excel formula: Replace one character with another
Generic formula 

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

In the example shown, the formula in C6 is:

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

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.

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.

If you need to replace a character at a specific location, see the REPLACE function.

Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.