Pressing Ctrl+H in Excel opens the Find and Replace dialog box with the Replace tab already selected. From there you can type a search term, type what you want it to become, and replace one match at a time or every match at once across the current sheet or the whole workbook. The same shortcut works in Excel for Microsoft 365, Excel 2019 and later, and Excel for the web, and the keyboard combination is the shortcut for the Replace command on the Home tab's Editing group, so nothing extra needs installing or enabling. Before you start, save your file or work on a copy if the replacement touches a lot of cells, because Replace has no built-in undo history of its own beyond the normal single Undo step.
What You'll Need
- A workbook open in Excel, either the desktop app (Windows or Mac) or Excel for the web.
- At least a rough idea of the exact text, number or formula fragment you want to find.
- For large edits, a saved copy of the file so you can compare results afterward.
- On Mac, the function keys set up the way your keyboard expects; the shortcut usually needs the Fn key held with it.
Step-by-Step
- Open the worksheet you want to edit. To limit the search to specific cells, select that range first; Excel searches only the selection when one exists. If you select nothing, Excel searches the entire active sheet.
- Press Ctrl+H on Windows, or Control+H on a Mac. The Find and Replace dialog opens on the Replace tab. If your Mac keyboard has a Function key row, you may need to press Fn+Control+H instead. Menu labels and dialog wording can differ slightly between versions and platforms, so if a button name below does not match exactly, look for the closest equivalent.
- In the Find what box, type the exact text you want to locate. Match case matters only if you switch it on later, so typing lowercase will also match uppercase by default.
- In the Replace with box, type the replacement text. If you want to delete the found text rather than change it, leave this box completely empty.
- Choose Find Next to jump to the first match. Excel highlights the cell and shows you where it is, which is useful for checking that your search term is matching what you expect before you commit to a bulk change.
- Choose Replace to change that single highlighted match, or choose Replace All to change every match in the search scope at once. Replace All reports how many replacements were made, which is your first clue that something went wrong.
- Expand Options if you need control over the match. From there you can turn on Match case, Match entire cell contents, or choose to search within formulas, values, comments or notes. Search direction (by rows or by columns) and the search scope (sheet or workbook) also live in that expanded panel.
- Check the result. Scan a few changed cells, especially if you replaced a short string that could appear inside other words, and press Ctrl+Z immediately if the outcome is not what you wanted.
If that did not work
If Replace All reports zero matches, your search term is probably not present in the way you typed it. Check for leading or trailing spaces, and try turning off Match entire cell contents. If the dialog opens but the keyboard shortcut does nothing, another add-in or a system shortcut may be capturing the key combination; try the Home tab, then Editing, then Find & Select, then Replace instead.
Common Mistakes
The most frequent problem is replacing a whole word when only a fragment was intended. Searching for "cat" will also hit "category" and "concatenate", so the replacement silently damages unrelated cells. Use Match entire cell contents when the term must stand alone, or make the search string longer and more specific.
Another common error is assuming Replace only changes the visible display. Excel can search formulas as well as values, so a replacement can alter a formula reference and break calculations. Always set the Within option to Formulas or Values deliberately rather than leaving it to chance, and verify a sample of cells afterward.
People also forget the selection rule. If cells were selected before the dialog opened, Replace All applies only to that selection and the rest of the sheet stays untouched, which looks like a partial failure but is working as designed. Press Escape or click a single cell to clear the selection first if you want a sheet-wide change.
Replacing numbers is another trap. If a cell contains a date or a number stored as text, replacing digits can convert its type or produce text that no longer calculates. Check the number format of a few affected cells after a numeric replacement.
Tips
Use Replace with an empty Replace with box to strip unwanted characters, such as extra spaces or stray symbols, across many cells at once. It is far faster than editing cell by cell.
Wildcards are available when you expand Options and tick the Use wildcards box: the question mark matches any single character and the asterisk matches any run of characters. That makes it possible to replace patterns rather than exact strings, but test on a small range first because wildcard replacements can match far more than expected.
If you need to change formatting rather than content, such as a fill colour across many cells, the Replace dialog's Format button on both the Find and Replace sides handles that. Use Choose Format From Cell to pick up formatting from an existing cell rather than rebuilding it manually.
When a spreadsheet has both data and formulas referring to the same label, run the replacement once with Within set to Formulas and once with it set to Values so you can see exactly what each pass changes.
Troubleshooting
If the dialog will not open on a Mac, hold Fn with Control and H; many Apple keyboards map the function row to media keys by default. You can also reach the same command through the Edit menu, then Find, then Replace.
If Replace All keeps returning an error about too many cells or takes a long time, the workbook is likely very large. Work in smaller selections, one range at a time, and save between passes so an accidental change is easy to reverse.
If replacements appear not to stick, check whether the sheet is protected. On a protected sheet, locked cells cannot be edited until protection is removed with the correct password. You cannot replace content in cells you do not have permission to change, and there is no legitimate way around that protection.
If Undo does not restore everything, remember that Undo steps back one action at a time. Press Ctrl+Z repeatedly, or close the file without saving and reopen your saved copy if the change was extensive and you have a clean version on hand.
If the Find and Replace dialog appears behind the Excel window or seems frozen, close it with Escape, save the workbook, and reopen Excel. If the problem persists across files, check for pending Office updates, since dialog behaviour occasionally changes between builds.
Frequently Asked Questions
Does Ctrl+H work the same in Excel for the web?
Yes. The browser version opens the Find and Replace panel with the same find and replace fields, though the Options area is more limited than in the desktop app.
Can I replace text across every sheet at once?
Yes, but only after expanding Options and setting the search scope to the workbook. By default the search covers the active sheet only.
What is the difference between Ctrl+F and Ctrl+H?
Ctrl+F opens Find to locate text; Ctrl+H opens Find and Replace, which can also change it. Both live in the same dialog, just on different tabs.
Can Replace change cell formatting?
Yes. With the options expanded, use the Format button to set formatting on the Find and Replace sides, then run the replacement.
Will Replace work on hidden rows and columns?
Yes. Replace affects hidden cells as well as visible ones, so unhide rows first if you need to review every change.
Can I undo a Replace All?
Usually with a single Ctrl+Z, but large multi-sheet operations are safest on a saved copy you can revert to.