In Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace on the Replace tab. Enter the text to find, enter its replacement, then choose Replace to review matches one at a time or Replace All to change every match in the selected search area.
What the Excel Replace Shortcut Opens
Ctrl+H is the keyboard shortcut for opening Excel’s Find and Replace controls. It is useful when correcting a repeated typo, changing a label used throughout a sheet, or updating a text fragment in many cells. The dialog separates the search term from the replacement text, so you can check both before applying a change.
Find and Replace works with cell contents; it is not the same as editing a single cell. If you only need to change one value, select the cell, press F2 or edit the formula bar, make the correction, and press Enter. For a repeated change, Ctrl+H avoids having to locate and edit each matching cell by hand.
To search without changing anything, press Ctrl+F instead. That opens the Find controls. You can also open Find and Replace from the ribbon using Home > Find & Select > Replace. The ribbon route is useful if a keyboard shortcut is intercepted or forgotten.
How to Replace Text Step by Step
- Decide whether the search should cover the entire worksheet or just a selected range. If you select cells first, Excel can limit the search to that selection.
- Press Ctrl+H. In the Replace tab, type the text or value to locate in the Find what box.
- Type the new text or value in the Replace with box. Leave that box empty only if your intention is to remove the matching text.
- Choose Find Next to inspect a match, then use Replace to change it and move on. Choose Replace All only when every match in the chosen scope should be changed.
- Read Excel’s completion message, close the dialog, and scan the affected cells. If the result is wrong, press Ctrl+Z immediately to undo the replacement.
For example, suppose a worksheet contains the old project label Northstar in several cells and the new label is Horizon. Put Northstar in Find what and Horizon in Replace with. Replace All changes every matching occurrence in the search area; it does not mean “replace the selected cell only.” If there is any chance that Northstar appears inside a longer word or in an unrelated note, use Find Next and review the matches first.
Choose the Search Scope Before Replacing
Search scope is one of the most important choices in the dialog. By default, Excel commonly searches the active worksheet, but the Options controls let you adjust settings such as where to search and what kind of cell content to examine. Depending on the selection and dialog state, you may be able to search within the current sheet or the whole workbook. Check the displayed scope rather than assuming that Replace All applies only to the visible area.
Selecting a range before opening Find and Replace can be helpful when you intend to update just one column or table. For instance, select the status column before replacing an obsolete status label. Take care when using a table selection: confirm that the intended cells, rather than the whole sheet, are selected. If you need a workbook-wide change, set the scope to Workbook where available and verify the setting before replacing.
The search options also affect what counts as a match. Match case distinguishes uppercase from lowercase letters. Match entire cell contents limits a match to a cell whose complete content is the search term. Without that option, a search for cat can also match a cell containing catalog. In the Options area, inspect the Look in setting too: searching formulas can find text in a formula, while searching displayed values can behave differently.
Wildcards and Special Search Characters
Excel supports wildcard characters in the Find what box, which can help locate groups of text rather than one exact phrase. An asterisk represents any number of characters, including none; a question mark represents one character. For example, searching for Sam* can find entries beginning with Sam, such as Samantha or Sample, while Sam? matches Sam followed by exactly one character.
Use a tilde when you need to search for a wildcard character as literal text. For example, ~* searches for an actual asterisk instead of treating it as a wildcard. This matters in worksheets that contain imported codes or notes with symbols. Wildcards can make Replace All powerful, but they can also produce broad matches that are difficult to spot, so test the search with Find Next before replacing.
Find and Replace is not a full regular-expression tool. A pattern that works in another program may not work in Excel. If the task involves complicated text rules, such as extracting variable portions or applying multiple conditions, use a formula, Power Query, or a carefully reviewed transformation rather than assuming Excel’s wildcard syntax supports every pattern.
Replacing Text in Formulas, Numbers, and Formats
Excel can search in formulas as well as in cell values, and that distinction is consequential. If you search formulas, a match may be part of the formula text rather than the result displayed in the cell. Replacing a text fragment inside formulas can alter references, function names, or text literals. Before doing this across a workbook, save a separate copy and inspect a few formulas that will be affected.
When replacing text that appears as part of a formula’s displayed result, consider whether the result is generated from a formula. Replacing the cell’s formula text is not the same as changing the value it calculates. If the formula builds a label from a source cell, update the source data or formula logic instead of trying to overwrite the displayed result. Otherwise, the formula may continue to produce the old text or be damaged by a broad replacement.
Find and Replace can also work with formatting criteria through the dialog’s Format options. This is different from replacing words: you can search for cells with particular formatting and apply replacement formatting. Because format settings can include several properties, review the criteria and use Find Next before applying a bulk formatting change. To clear an accidentally set format criterion, use the format controls in the dialog rather than assuming that typing a new search term removes it.
Common Problems and Safer Fixes
- Replace All changes too much: Undo with Ctrl+Z as soon as you notice the problem. Then narrow the selection, choose the correct sheet or workbook scope, or enable Match entire cell contents.
- Excel reports no matches: Check spelling, spaces, case settings, the selected range, and the Look in option. A cell may display a calculated value while the search is examining its formula.
- A search for punctuation behaves unexpectedly: Check whether the character is an Excel wildcard. Use a tilde to search for a literal asterisk or question mark.
- Replace All seems to skip some cells: Some cells may not match the chosen case, scope, or content type. Inspect the search options and test with Find Next.
- A replacement affects formulas: Undo if possible, restore from a saved copy if necessary, and avoid broad formula replacements until you understand exactly which formula text will match.
Ctrl+Z usually reverses a recent replacement, but undo history is not a substitute for a backup. Some later actions can make it harder to return to the exact earlier state, and a workbook may be shared or saved over the original. For important workbooks, save a copy before a workbook-wide replacement. Also remember that ordinary replacement is not a reliable way to change every visual detail of a workbook; it will not automatically rewrite chart labels, images, or text in every external object.
Windows, Mac, and Excel for the Web
In the Windows desktop version, Ctrl+H opens the Replace tab. In Excel for Mac, the equivalent is generally Control+H; use the Control key rather than assuming that Command+H is the same shortcut. Menu and shortcut behavior can vary with the keyboard layout or Excel release, so the ribbon route is a dependable alternative: open the Home tab and choose Find & Select, then Replace.
Excel for the web runs inside a browser, where keyboard shortcuts can overlap with browser commands. If Ctrl+H opens browser history or does not bring up Excel’s replacement controls, use the Excel ribbon instead. Look for Home > Find & Select > Replace; available controls can differ slightly as the web interface changes. Make sure the workbook has finished saving before closing the browser tab after a large replacement.
When to Use Find and Replace Instead of Another Tool
Find and Replace is best for direct, repeatable substitutions: correcting a name, changing a short code, or removing a known text fragment. It is quick and transparent when the matches are predictable. It is less suitable when the change depends on a rule, such as changing only the first word in a sentence, transforming data based on another column, or reformatting inconsistent imported records.
For a repeatable transformation, a formula can preserve the original data and show the changed result in another column. Power Query is often a better fit for cleaning or reshaping imported data that will be refreshed. For one-off edits, the dialog is usually simpler. The key distinction is whether you want to overwrite matching content or create a calculated, refreshable result.
Frequently Asked Questions
What is the shortcut for Replace in Excel?
In Excel for Microsoft 365 on Windows, press Ctrl+H. It opens Find and Replace on the Replace tab. On a Mac, Control+H is the usual equivalent; in Excel for the web, use the ribbon if the browser intercepts the shortcut.
How do I replace all occurrences in Excel?
Open Ctrl+H, enter the search text and replacement, confirm the search scope and options, then select Replace All. Check Excel’s message and review the results. Use Replace one match at a time if you need to approve each change.
Can I replace text in only one column?
Yes. Select the intended cells in that column before opening Find and Replace, then confirm that Excel is searching the selection. If the selection is not respected, recheck the highlighted range and the dialog’s scope before choosing Replace All.
Can Excel replace part of a cell’s text?
Yes. Unless Match entire cell contents is enabled, the search can match a fragment within a cell. For example, replacing a short phrase can change that phrase inside a longer entry, so inspect matches when the fragment might occur in unrelated text.
How do I undo Replace All?
Press Ctrl+Z right after the operation in Windows, or Command+Z on Mac. Undo is most dependable before other workbook actions are performed. For valuable files, save a separate copy before making a broad replacement.
Related
- Excel Not Responding: Should You Wait or Close It?
- How to Split First and Last Name in Excel
- How to Freeze Top Row and First Column in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Day and Month Reversed? Fixing Date FormatsExcel usually does not swap the day and month in a date that is already stored correctly; a…
- Excel Day Hour Minute Second Format: Display DurationsTo display an elapsed time in Excel as hours, minutes, and seconds, apply the custom number format [h]:mm:ss.…
- Excel Bar Names: What Each Part of the Window DoesIn Excel for Microsoft 365 on Windows, the main interface areas people call “bars” include the title bar,…
- Excel Day Trading Journal: Build a Useful Trade LogYes—Excel can track day trades, calculate profit and loss, and help you review whether your strategies and rules…
- Media Excel Shortcuts for Images, Links, and ObjectsExcel has no single keyboard shortcut for all media. In Microsoft 365 for Windows, use Ctrl+V to paste…
- Excel Bar Plot: How to Create and Format OneIn Excel for Microsoft 365 on Windows, select your category and value columns, then choose Insert > Insert…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.