To replace text in Excel, press Ctrl+H (Windows) or Cmd+H (Mac) to open Find and Replace, type what you want to find in the Find what box, type the replacement in Replace with, then click Replace All to change every match in the current selection or sheet, or Replace to step through matches one at a time. That is the whole job for most cases. The useful part is knowing how to limit the search to one sheet, one column, or one formatting pattern, because Replace All across a workbook is unforgiving once it has run.
What You'll Need
- Excel for Windows, Mac, or Excel for the web (Excel on iPhone and Android has no Find and Replace dialog; use the web or desktop version instead).
- The workbook open, with the sheet you want to edit active.
- A backup of important files. Save a copy before a large Replace All, because Undo is your only safety net and it is easy to lose it.
Note that menu and dialog labels vary slightly by Excel version, platform and region. If a label you see differs from the one below, the option is usually in the same place under a slightly different name.
Step-by-Step
- Save a copy first. Use File > Save As to keep an original, or press Ctrl+S so the current state is saved. Replace All can be undone with Ctrl+Z, but only while the file stays open and only for the most recent operation, so a saved copy is cheap insurance.
- Choose the scope. If you want to replace only inside one column, select that column's cells first (click the column header for the entire column, or drag over just the rows you need). If you select nothing, Find and Replace searches the entire active sheet. It does not search other sheets at once.
- Open the dialog. Press Ctrl+H on Windows or Cmd+H on Mac. On the Home tab, the Find & Select button also has a Replace entry.
- Enter the search text in the Find what box. Type it exactly as it appears. Capit
- Enter the replacement in the Replace with box. Leave this box empty to delete every match instead of substituting something.
- Set the search options. Click Options to expand the dialog. For a case-sensitive replace (so apple does not match Apple), tick Match case. To require a whole word only, tick Match entire cell contents, which is essential when replacing short strings such as a code like AB that might otherwise appear inside longer words.
- Use Find Next to preview. Click Find Next repeatedly to cycle through hits and confirm the pattern is right before changing anything. This is the single step most people skip and later regret.
- Replace a single match by clicking Replace, which changes the highlighted match and moves to the next one. Use this when only some hits should change.
- Replace everything with Replace All. Excel reports how many replacements it made. If the count is far higher than you expected, press Ctrl+Z immediately and rethink the search string.
- Close the dialog and check a few changed cells visually. Confirm formatting, leading spaces and adjacent text survived as intended.
For wildcard matching, tick Use wildcards if it is shown, or note that wildcards are on by default in many Excel versions. The question mark ? matches any single character, the asterisk * matches any run of characters, and the tilde ~ escapes a wildcard so you can search for a literal asterisk or question mark (type ~* to find real asterisks). A search such as Mr* in Find what with Ms in Replace with converts every name starting with Mr to one starting with Ms in a single pass.
To replace formatting rather than text, leave Find what empty if you want, click Format and choose the format to find (for example a red fill), then set the replacement format through Format > Replace options. Click Choose Format From Cell and click a sample cell to capture its formatting exactly rather than rebuilding it by hand. This is the practical way to strip a highlight colour across hundreds of cells without retyping a thing.
Common Mistakes
- Replacing across the whole sheet when only one column was meant. Short strings almost always appear elsewhere. Always select the target range first.
- Forgetting trailing or leading spaces. Replacing Smith will not touch Smith with a space after it, leaving a mix of changed and unchanged cells. Search for the space too, or clean spaces with TRIM in a helper column first.
- Ignoring Match entire cell contents. Replacing NY without it will also hit HNY, many and any word containing those letters, in lower or upper case depending on Match case.
- Relying on Undo after saving or closing. Once the file is closed, Replace All cannot be undone. Keep the backup copy.
- Assuming it reaches every sheet. It does not. Repeat the operation per sheet, or use Group by selecting several sheet tabs with Ctrl held before replacing, then remember to ungroup.
Tips
- Right-click a sheet tab and choose Select All Sheets to group every sheet, then run Replace All once to cover a whole workbook in one pass. Right-click again and choose Ungroup Sheets immediately afterwards, or later edits will hit every sheet at once.
- Use Find All (Ctrl+F, then Find All) to get a list of every match with its cell address before replacing. Clicking a result in the list jumps to that cell.
- To move data rather than edit it, use Find and Replace only as a last resort when the values have a consistent pattern; formulas with SUBSTITUTE are safer for repeatable cleanups.
- Column ranges can be limited with the Within option in the Options panel, which lets you choose Sheet or Workbook. Workbook is faster to run but riskier, so preview with Find Next first.
Troubleshooting
Nothing is found although the text is visible. Check that you are on the right sheet, that the selected range contains the cell, and that you are not fighting a conflict between Match case and the actual capitalisation. If formatting is involved, remove the format filter with Format > Clear Find Format.
The dialog replaces the wrong things. Undo with Ctrl+Z, then retype the find string carefully. Invisible spaces are the usual culprit. Click into the Find what box, select all with Ctrl+A and retype it cleanly rather than pasting from another app.
The count says zero but you can see matches. The search may be limited to a selected range, or the workbook may be filtered so hidden rows are skipped. Clear the filter and try again.
The replace deleted too much. Press Ctrl+Z once to reverse the last replacement. If that does not restore everything, close without saving and reopen the backup copy. If the file was already saved, look for a previous version under File > Info > Version History where available.
You cannot find the dialog on a phone. Excel on iPhone and Android does not offer Find and Replace. Open the file in Excel for the web or on desktop to make the change, then let it sync back.
Frequently Asked Questions
Does Replace All work across every sheet in a workbook?
Not by default. It works on the active sheet or the selected range. Group the sheet tabs or use the Within option set to Workbook if your version offers it.
How do I replace a question mark or asterisk literally?
Put a tilde in front of it: ~? or ~*. Without the tilde, Excel treats those characters as wildcards.
Can I replace text with nothing?
Yes. Leave the Replace with box empty. Every match is deleted, which is handy for stripping unwanted characters or line breaks.
Why did my replacement change the case unexpectedly?
Untick or tick Match case in the Options panel. With it off, the search ignores capitalisation and matches both upper and lower case.
Can I undo a Replace All after closing the file?
No. Ctrl+Z only works while the workbook is open. Reopen your backup copy or restore a previous version instead.
Does replacing affect formulas or only displayed values?
It edits the cell contents, so text inside a formula string can be changed too. Use Find All to inspect matches first if your sheet contains formulas.