To remove and replace text in Excel, use Ctrl+H (Windows) or Command+Shift+H (Mac) to open Find and Replace, type the text to remove in Find what, leave Replace with blank, and click Replace All to delete it. To replace it with something else, type the new text in Replace with before clicking Replace All. For more control, use formulas like SUBSTITUTE or the Text to Columns feature. This guide covers safe removal, targeted replacement, and how to avoid common pitfalls.
What You'll Need
- Microsoft Excel (any recent version for Windows or Mac; steps may differ slightly by version and region).
- A worksheet containing the text you want to change.
- Optional: a backup copy of your file (recommended before any bulk edit).
Step-by-Step
- Select the range (optional but safer). Click a single cell to search the whole sheet, or drag to highlight a specific range. If you want to search the entire workbook, press Ctrl+H and choose Options > Within: Workbook.
- Open Find and Replace. Press Ctrl+H on Windows or Command+Shift+H on Mac. The Find and Replace dialog opens on the Replace tab.
- Enter the text to remove or replace. In the Find what box, type the exact text, number, or character you want to target. To remove it, leave the Replace with box completely empty.
- Enter the replacement text (if any). In the Replace with box, type what should take its place. For example, find NY and replace with New York.
- Choose your search options. Click Options to expand settings. Tick Match case if capitalization matters. Tick Match entire cell contents if you only want to replace cells that contain exactly that text and nothing else. Use Within: Sheet or Workbook to control scope.
- Replace one at a time or all at once. Click Find Next to jump to the first match, then Replace to change just that one. Click Replace All to change every match in the selected scope. Excel reports how many replacements were made.
- For partial removal inside a cell, use a formula. If you need to strip a specific substring from a cell without affecting other text, use
=SUBSTITUTE(A1, "old", "")to remove it, or=SUBSTITUTE(A1, "old", "new")to replace it. Copy the formula down, then copy the results and use Paste Values to replace the original data. - For splitting text into columns, use Text to Columns. Select the column, go to Data > Text to Columns, choose Delimited or Fixed width, set the delimiter (e.g., comma or space), and finish. This removes the delimiter and separates the text into new columns.
- For removing spaces or non-printing characters, use TRIM or CLEAN.
=TRIM(A1)removes extra spaces (except single spaces between words).=CLEAN(A1)removes non-printing characters. Combine them:=TRIM(CLEAN(A1)). - Check your work. After any bulk replace, scan the affected area. Use Ctrl+Z to undo if something went wrong. Save the file under a new name if you want to keep the original intact.
Common Mistakes
- Replacing across the whole workbook unintentionally. By default, Find and Replace works on the active sheet only. If you change Within to Workbook, every sheet is affected. Always check the Within setting before clicking Replace All.
- Leaving Match entire cell contents off when you need it. Searching for cat without this option will also change category to category (or worse, dog to dog). Tick it when you want exact matches only.
- Forgetting that Find and Replace does not work on formulas' results. It searches the formula text, not the calculated value. To replace a calculated result, you must change the formula or paste values first.
- Removing text that is part of a larger word. For example, replacing an with nothing turns banana into bana. Use Match entire cell contents or include surrounding spaces in your search term.
- Not accounting for case sensitivity. By default, Excel ignores case. If you need to replace only lowercase apple but not Apple, tick Match case.
- Using Replace All on a protected sheet. If the sheet is protected, Excel will not make changes. Unprotect it first (Review > Unprotect Sheet) if you have permission.
Tips
- Work on a copy. Before any large-scale replace, save a backup (File > Save As) so you can revert if needed.
- Use wildcards for patterns. In the Find what box,
?matches any single character,*matches any number of characters, and~escapes a wildcard. For example,Sm?thfinds Smith and Smyth. Tick Use wildcards in Options if it is not already on. - Replace formatting too. Click Options > Format to choose specific formatting to find or replace (e.g., replace all bold red text with plain black).
- Use Go To Special for blanks. To remove blank cells, select the range, press F5 > Special > Blanks, then delete or fill as needed.
- Convert formulas to values after replacing. If you used SUBSTITUTE, copy the formula results and use Paste Values to lock in the changes before deleting the original column.
- Check for leading/trailing spaces. These often cause Find and Replace to miss matches. Use TRIM first or include spaces in your search term.
Troubleshooting
- Replace All says "We couldn't find anything to replace." Check for extra spaces, wrong case (if Match case is on), or that you are searching the correct sheet/workbook. Also confirm the cell is not formatted as text when you expect a number.
- Replace All is greyed out. The sheet may be protected or the workbook may be shared. Unprotect the sheet (Review > Unprotect Sheet) or unshare the workbook (Review > Share Workbook) if you have permission.
- Replacements happen in the wrong places. Undo immediately with Ctrl+Z. Then redo with Match entire cell contents or a more specific search term.
- Find and Replace does not find text in formulas. It searches the formula itself, not the result. To replace calculated values, copy the column and paste as values first, then replace.
- Wildcards are not working. Make sure Use wildcards is ticked in Options. If you need to search for a literal
*or?, precede it with~(e.g.,~*). - Text is split across multiple cells after Text to Columns. This is expected. You can delete the extra columns or merge them back with
&or CONCAT.
Frequently Asked Questions
How do I remove a specific word from a cell without deleting the whole cell?
Use =SUBSTITUTE(A1, "word", "") to replace the word with nothing, leaving the rest of the text intact. Copy the formula down, then copy and paste as values.
Can I replace text in multiple sheets at once?
Yes. In Find and Replace, click Options and set Within to Workbook. Then click Replace All. Be aware this affects every sheet in the workbook.
Why does Find and Replace not find numbers I can see?
The numbers may be stored as text. Try searching with the same formatting (e.g., include commas) or convert the cells to numbers first (Data > Text to Columns > Finish).
How do I remove all spaces from a cell?
Use =SUBSTITUTE(A1, " ", "") to remove every space, or =TRIM(A1) to remove only leading, trailing, and extra internal spaces.
Does Find and Replace work on protected sheets?
No. You must unprotect the sheet first (Review > Unprotect Sheet) if you have the password. Without permission, you cannot make changes.
Can I undo a Replace All?
Yes, immediately after the operation, press Ctrl+Z. If you have saved and closed the file, you cannot undo; restore from a backup instead.