To replace a character in Excel, use Find and Replace (Ctrl+H on Windows, Command+H on Mac) for a quick one-off swap, or the SUBSTITUTE function when you want the change to update automatically. For example, =SUBSTITUTE(A1,"-","") removes every hyphen in cell A1. Which method you pick depends on whether you want to edit the existing text in place or create a new, formula-driven version. The steps below cover both, plus the cases where Find and Replace quietly fails.
What You'll Need
- Excel for Windows, Mac, or the web (the steps below note where the web version differs).
- The workbook containing the text you want to change, with edit access.
- For the formula method: a spare column to hold the result, so you do not overwrite the original.
- Optional: a backup copy of the sheet if you are about to run a wide Find and Replace across many cells.
Step-by-Step
Method 1: Find and Replace (fast, permanent edit)
- Select the range you want to change. If you want the whole sheet, click any single cell; Find and Replace searches the entire sheet by default. Selecting a range first limits the search to that range.
- Press Ctrl+H (Windows) or Command+H (Mac). On Excel for the web, the shortcut also opens Find and Replace; if it does not, use the Home tab and look for the Find & Select menu, then choose Replace. Menu labels can differ slightly by version, device, and region.
- In the Find what box, type the character or text you want to replace. To replace a single character, type just that character, for example a hyphen or a comma.
- In the Replace with box, type the replacement. To delete the character entirely, leave this box empty.
- Click Find Next to jump to the first match and confirm it is the one you mean, then click Replace. Or click Replace All to change every match in the selected scope at once.
- Excel reports how many replacements it made. Click OK, then close the dialog. Save the file with Ctrl+S or Command+S.
Find and Replace changes the cell contents permanently. If you might need the original text later, undo with Ctrl+Z or work on a copy.
Method 2: SUBSTITUTE function (dynamic, non-destructive)
- Click an empty cell next to your data, for example B1 if your text is in A1.
- Type
=SUBSTITUTE(A1,"old","new"), replacingoldwith the character you want to remove andnewwith what should take its place. For example,=SUBSTITUTE(A1," ","_")turns spaces into underscores. - Press Enter. The result appears in the cell; the original in A1 is untouched.
- Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to the rest of your rows.
- To make the results permanent, copy the formula column, then use Paste Special > Values over the original column, and delete the helper column. Paste Special is on the right-click menu and on the Home tab under Paste.
SUBSTITUTE is case-sensitive. If you need a case-insensitive replacement, combine it with UPPER or LOWER, or use Find and Replace with Match case unchecked.
Method 3: Replace only the nth occurrence or a specific position
- Use the optional fourth argument of SUBSTITUTE to target one occurrence:
=SUBSTITUTE(A1,"-","/",2)replaces only the second hyphen. - To replace a character at a fixed position, combine LEFT, MID, and RIGHT, for example
=LEFT(A1,2)&"X"&MID(A1,4,LEN(A1))swaps the third character for X.
Common Mistakes
- Replacing across the whole workbook by accident. Find and Replace works on the active sheet unless you choose Options > Within: Workbook. Check that setting before clicking Replace All.
- Forgetting that formulas are searched as text. Find and Replace looks at the formula, not the displayed result, so replacing a character can break a formula. Switch to Formulas view (Ctrl+`) to inspect what is actually in the cells.
- Leaving wildcards on. Characters like
*,?, and~act as wildcards in Find and Replace. To replace a literal asterisk, type~*in the Find what box. - Assuming SUBSTITUTE is case-insensitive. It is not; "a" and "A" are different to it.
- Overwriting the source column without a backup. Paste Special > Values is permanent; keep a copy of the original column until you have checked the result.
Tips
- Press Ctrl+H with a range selected to limit replacements to that range only, which is safer than Replace All on a busy sheet.
- Use Find All first to see every match in a list before you commit to Replace All.
- To strip a character from every cell in a column, SUBSTITUTE with an empty replacement (
"") is cleaner than Find and Replace because it leaves the original data intact until you paste values. - If you are cleaning imported data, TRIM removes extra spaces and SUBSTITUTE handles the rest; combine them as
=TRIM(SUBSTITUTE(A1,"-"," ")). - On Excel for the web, some advanced Find options are limited compared with the desktop app; do heavy cleanup in the desktop version if a setting is missing.
Troubleshooting
- Nothing was replaced. Check the scope (Sheet vs Workbook), confirm Match case and Match entire cell contents are set the way you expect, and make sure the character is not a wildcard that needs escaping with
~. - Wrong cells changed. Press Ctrl+Z immediately to undo, then redo the replacement with the correct range selected first.
- SUBSTITUTE returns #VALUE!. One of the arguments is not text; wrap numbers with TEXT or convert the cell to text first.
- The formula result looks right but the original did not change. SUBSTITUTE does not edit the source cell; copy the result and use Paste Special > Values as described in Method 2.
- Find and Replace cannot find a character you can see. The character may be a non-breaking space or another invisible character pasted from a website. Copy it directly from the cell into the Find what box rather than retyping it.
Frequently Asked Questions
Can I replace a character in multiple sheets at once?
Not directly. Find and Replace works on the active sheet unless you set Within: Workbook, which searches all sheets but still applies replacements sheet by sheet. For a controlled change, repeat the replacement on each sheet or use a formula in a summary sheet.
How do I replace a character only in part of a cell?
Use SUBSTITUTE with the occurrence argument, or combine LEFT, MID, and RIGHT to rebuild the string around the position you want to change. Find and Replace cannot target a position inside a cell.
Does Find and Replace work on hidden rows and columns?
Yes. Find and Replace searches hidden cells as well, so unhide rows first if you want to review matches before replacing.
Why does replacing a quote or apostrophe fail?
Straight and curly quotes are different characters. Copy the exact character from the cell into the Find what box, or replace the curly version by pasting it in rather than typing it.
Can I undo a Replace All?
Yes, with Ctrl+Z or Command+Z immediately after the operation, as long as you have not closed the workbook. Once saved and closed, the change is permanent, which is why a backup copy is worth keeping.