To remove specific characters from a cell in Excel, use a formula that targets the exact text, symbol, or character position you want to change.

The best method depends on whether the unwanted character is known, repeated, or located at a predictable position.

Use SUBSTITUTE to remove a known character or text

SUBSTITUTE replaces matching text with another value.

To remove a character, replace it with an empty string ("").

The basic syntax is:

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

Suppose cell A2 contains AB-123-XY.

To remove every hyphen, enter:

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

The result is AB123XY.

The formula removes every occurrence of the specified hyphen, while leaving other characters unchanged.

You can substitute any literal character, such as a slash, period, comma, or underscore.

To remove a repeated word or phrase, use the same pattern.

If A2 contains Order: 8472, then =SUBSTITUTE(A2, "Order: ", "") returns 8472.

Remove only one occurrence

The optional fourth argument limits which occurrence is replaced.

For example, if A2 contains 12-34-56, this formula removes only the first hyphen:

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

It returns 1234-56.

Change the final argument to 2 to remove only the second hyphen, producing 12-3456.

If the specified occurrence does not exist, Excel leaves the text unchanged.

To remove the first occurrence of a character regardless of how many times it appears, keep the instance number at 1.

Omit the fourth argument when you want to remove all matches.

Remove characters by position with REPLACE

When you know where the unwanted character appears, use REPLACE.

Its syntax is:

=REPLACE(old_text, start_num, num_chars, new_text)

For example, if A2 contains ABC-123 and the hyphen is always the fourth character, use:

=REPLACE(A2, 4, 1, "")

This returns ABC123.

The arguments say to begin at position 4, remove 1 character, and insert an empty string.

REPLACE is useful for fixed-format identifiers, but it can remove the wrong character if the text length or layout varies.

Use SUBSTITUTE when the character itself is the reliable thing to target, regardless of position.

Remove several specific characters

For a short list of characters, nest SUBSTITUTE functions.

If A2 contains AB-12/34 and you want to remove both the hyphen and slash, use:

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

The result is AB1234.

Excel evaluates the inner formula first, removing hyphens, then removes slashes from that result.

Add another SUBSTITUTE layer for each additional character.

In Microsoft 365 and Excel 2021 or later, REDUCE can apply a list of characters more compactly.

Put the characters to remove in B1:B3, one per cell, then use:

=REDUCE(A2, B1:B3, LAMBDA(text, char, SUBSTITUTE(text, char, "")))

This repeatedly applies SUBSTITUTE to the value in A2.

The formula requires a version of Excel that supports REDUCE and LAMBDA; it is not supported in older perpetual releases such as Excel 2019.

For broad compatibility, use nested SUBSTITUTE functions instead.

Remove line breaks and nonprinting characters

Data copied from web pages or other applications may contain line breaks or control characters that are not visible in the cell.

To remove common nonprinting characters, use:

=CLEAN(A2)

CLEAN removes many nonprinting ASCII characters, including common line breaks, but it does not remove every unusual Unicode character.

To remove a line feed specifically, use:

=SUBSTITUTE(A2, CHAR(10), "")

On Windows, a line break may include both a carriage return and line feed.

To remove both:

=SUBSTITUTE(SUBSTITUTE(A2, CHAR(13), ""), CHAR(10), "")

If copied text contains nonbreaking spaces, which often look like regular spaces, try:

=SUBSTITUTE(A2, CHAR(160), "")

Use an empty string to remove those spaces, or replace it with a regular space if you want to preserve word separation.

Apply the formula to a range

Enter the formula in a new column next to your source data.

For example, if values are in A2:A100, enter =SUBSTITUTE(A2, "-", "") in B2, then fill the formula down through B100.

The references adjust for each row, so B3 applies the formula to A3.

Keep the original column if you may need to compare or restore the source values.

To replace the originals with cleaned results, copy the formula results and use Paste Special > Values over the source range.

Check that the results are correct before replacing the source data.

Common issues and edge cases

  • Nothing changes: Check that the character in the formula exactly matches the one in the cell.

    Similar-looking characters, such as a hyphen and an en dash, are different text.
  • Text is unchanged when removing a space: A copied value may contain a nonbreaking space.

    Try replacing CHAR(160) as well as a regular space.
  • A formula removes too much: With SUBSTITUTE, leaving out the instance number removes every matching occurrence.

    Add an instance number to target one occurrence.
  • Results look like numbers but behave like text: Text functions return text.

    If the cleaned result should be a number, convert it with VALUE, for example =VALUE(SUBSTITUTE(A2, ",", "")).

    This assumes the remaining text follows a number format Excel recognizes for your regional settings.
  • The formula shows an error: Some regional settings use semicolons instead of commas between function arguments.

    Replace the separators if Excel rejects the formula.

Formulas such as SUBSTITUTE and REPLACE return cleaned results in another cell; they do not edit the original value in place.

Choose the formula based on whether you are targeting a known character, one occurrence, or a fixed character position.