In Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace with the Replace tab ready. Enter the text to find and its replacement, choose the search scope and options, then select Replace or Replace All; on a Mac, use Control+H or open the Replace command from the Edit menu.
Open Replace in Excel
The Windows shortcut is the quickest way to reach the replacement controls. Press Ctrl+H while working in a worksheet; Excel opens the Find and Replace dialog on its Replace tab. Type the existing text in the Find what box and the new text in Replace with. Use Replace to review changes one at a time, or Replace All to apply matching changes within the chosen search area.
You can also reach the command through the ribbon: choose Home > Find & Select > Replace. This route is useful if you forget the shortcut, if a keyboard shortcut is being intercepted, or if you want to see the command before using it. Ctrl+F opens the Find tab instead; from there, select the Replace tab to switch to replacement.
- Ctrl+H: open Replace on Excel for Windows.
- Ctrl+F: open Find; select Replace in the dialog if needed.
- Home > Find & Select > Replace: open Replace from the ribbon.
Replace versus Find
Find locates matching text or values without changing them. Replace changes a match to new content, and Replace All makes that change repeatedly across the current search scope. For example, Find can show every cell containing North; Replace can change North to Northern; Replace All performs the change without pausing for each individual match.
Use Find first when you are uncertain how many cells match or whether the text appears in formulas, labels, or notes. It lets you inspect the matches before editing. Replace is better when the intended change is unambiguous, such as correcting a consistent spelling error in a column. The two commands share many search settings, so a setting chosen while finding can affect what Replace locates.
Choose the correct scope and options
Before using Replace All, check where Excel will search. The Within setting can limit the operation to the active sheet or extend it to the workbook. A workbook-wide replacement can change matching cells on other worksheets, which is easy to overlook. If a range of cells is selected before opening the dialog, Excel may search within that selection rather than the whole sheet. When scope matters, check the dialog settings and consider clearing an unintended selection first.
The dialog also offers ways to control how matches are interpreted. The Search setting determines whether Excel searches by rows or by columns. Look in lets you choose what kind of cell content to search, such as formulas, values, or notes. The exact choices can vary with the Excel version and context. If you are changing a formula, inspect the formula itself and use the appropriate Look in choice; changing text inside a formula can change the calculation, not merely its displayed result.
- Match case distinguishes uppercase and lowercase letters, such as Item and item.
- Match entire cell contents finds a cell only when its complete contents match the search text. Without it, a search for cat may also match catalog.
- Within determines whether the search covers the sheet or workbook.
- Look in controls whether Excel searches formulas, values, or other available content.
Options can remain set between searches. If a replacement unexpectedly finds nothing, reopen the dialog and check these choices rather than assuming the text is absent. In particular, Match case, Match entire cell contents, and the chosen scope can all explain why an obvious-looking match was skipped.
Use Replace All carefully
Imagine a worksheet with product codes such as AB-101, AB-102, and AB-103. If the prefix changes from AB- to ZX-, entering AB- as Find what and ZX- as Replace with can update those codes efficiently. But if AB- also appears in descriptions or formulas, an unrestricted Replace All could alter those cells too. Narrow the selection or search scope when only the code column should change, and review a few results before continuing.
For a small number of matches, use Find Next and then Replace to decide case by case. For a reliable, repeated correction, use Replace All after confirming the scope, search options, and replacement wording. Excel reports how many replacements it made, which provides a useful check, but it does not prove that every change was intended. Scan the affected range afterward, especially if formulas or important identifiers were involved.
Replacing a short string can have unintended effects when it occurs inside longer text. Replacing 1 with 2, for instance, might change 10 to 20 or affect a date or code. Turn on Match entire cell contents when the whole cell should match, or use a more distinctive search string. That option is not a substitute for checking whether a partial match is appropriate in the data you have.
Wildcards and formatting
Excel’s Find and Replace can use wildcards for text searches. An asterisk (*) represents any sequence of characters, including no characters; a question mark (?) represents one character. For example, a search for prod* can match text beginning with prod, while ??? can match a three-character string. Wildcards are useful for patterns, but they can also match more cells than a literal search, so test with Find Next before applying Replace All.
To search for a literal asterisk, question mark, or tilde, put a tilde (~) before the character. For example, search for ~* to find an actual asterisk rather than treating it as a wildcard. This distinction matters when a worksheet contains codes or notes that use those symbols.
The dialog can also search for or replace cell formatting through its Format controls. This is separate from changing text: a replacement can apply formatting even when the cell content is not what you expected to change. If formatting options have been set in an earlier search, review or clear them before a text-only operation. A format constraint can also make an otherwise matching cell fail to appear in the results.
Common problems and practical fixes
If Ctrl+H appears to do nothing, first make sure Excel is the active application and that the keyboard focus is not inside a cell editor or another dialog. Try the ribbon route, Home > Find & Select > Replace. Laptop function-layer settings usually do not change this Control-key shortcut, but keyboard utilities or remote-desktop tools can intercept keys. The ribbon command helps distinguish a shortcut issue from a search-setting issue.
If Excel says there are no matches, check that the text is spelled exactly as it appears, including spaces, punctuation, and hidden differences such as a nonbreaking space. Then check the selected range, Within setting, Match case, Match entire cell contents, and Look in choice. If values are produced by formulas, decide whether you need to search displayed results or formula text; replacing formula text is a different and potentially consequential edit.
If Replace All changes too much, stop and use Undo immediately if the replacement is the most recent action. In Excel for Windows, Ctrl+Z undoes it; on Mac, Command+Z is the usual undo shortcut. Undo is less dependable after other actions or after closing the workbook, so save a copy before a broad replacement. For high-impact edits, duplicate the worksheet or workbook first, and test the replacement on a small selection.
Windows, Mac, and Excel for the web
On Windows desktop Excel, Ctrl+H is the standard Replace shortcut. On Mac, Excel commonly uses Control+H for Replace, not Command+H. Mac keyboard settings and application versions can affect shortcut behavior, so if the key combination is intercepted or does not open the dialog, use the menu route Edit > Find > Replace where available. Command+F opens Find on Mac; the Replace tab can then be selected in the search interface.
Excel for the web runs in a browser, so keyboard combinations may conflict with browser commands or vary with the browser and interface. If Ctrl+H opens browser history instead of Excel’s replacement controls, use the Excel ribbon command, generally under Home > Find & Select > Replace when available. The desktop instructions are for Excel for Microsoft 365 on Windows; the browser interface may arrange its search controls differently.
Frequently Asked Questions
What is the Excel shortcut for Replace?
Press Ctrl+H in Excel for Windows. It opens the Find and Replace dialog on the Replace tab.
What is the Replace shortcut in Excel for Mac?
Use Control+H in Excel for Mac. If the shortcut is unavailable or intercepted, open Replace from Edit > Find > Replace, or use Command+F and switch to the Replace tab.
What does Ctrl+F do in Excel?
Ctrl+F opens Find, which searches without replacing content. From the Find and Replace dialog, choose the Replace tab when you want to change matches.
How do I replace text in the whole workbook?
Open Replace, set Within to Workbook, verify the search options, and then choose Replace or Replace All. Check the replacement count and inspect affected sheets afterward.
Can I undo Replace All?
Usually, press Ctrl+Z on Windows or Command+Z on Mac immediately after the replacement. To reduce risk, save a copy before making a broad change and avoid relying on Undo after other actions.
Related
- Excel Paste and Remove Duplicates: Steps and Safety
- Excel Text to Columns: Split Pasted Data Into Fields
- Excel Text to Columns: Can You Make It Automatic?
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Schedule an Email in Outlook on Desktop and WebTo schedule an email in Outlook, write your message, open the arrow or menu beside Send, choose Schedule…
- Excel This Action Won’t Work on Multiple SelectionsThe Excel message “This action won’t work on multiple selections” usually means the command needs one continuous, rectangular…
- Excel Protect Sheet: Allow FilteringYes. In Excel for Microsoft 365 on Windows, turn on AutoFilter before protecting the worksheet, then allow Use…
- Yes or No Drop-Down in Excel: How to Set It Up FastTo add a Yes or No drop-down in Excel for Microsoft 365 on Windows, select the cell or…
- How to Add a Checkbox in Google Sheets and Use ItTo add a checkbox in Google Sheets, select the cell or range where you want it, then choose…
- Track Changes in Word: How to Review and Accept EditsTo use Track Changes in Microsoft Word, open the Review tab and select Track Changes; Word will mark…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.