In Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace, then enter the text to find and what should replace it. To search without replacing anything, press Ctrl+F.
Find and replace at a glance
Find and Replace is useful when a value, label, code, or piece of formula text appears repeatedly in a worksheet. Instead of editing each occurrence manually, you can review matches one at a time or replace all matches within the selected search area. Ctrl+H opens the Replace tab of the dialog; Ctrl+F opens its Find tab.
The shortcut does not immediately change your data. It opens a dialog where you choose what to search for, what to put in its place, and whether to replace one match or every match. That pause is important: a broad search can affect many cells, so check the search scope and options before using Replace All.
- Ctrl+F: find text or values.
- Ctrl+H: find text or values and replace matches.
- Home > Find & Select > Replace: open Replace from the ribbon if you prefer menus.
Find versus replace: what changes?
Find locates matching content but leaves the worksheet unchanged. In the Find tab, use Find Next to move through results, or Find All to display a list of matches. Selecting an item in the Find All list takes you to that result. This is a good way to check how widely a term is used before deciding whether to edit it.
Replace adds an action to that search. In the Replace tab, type the existing content in Find what and the desired content in Replace with. Choose Replace to change the current match and continue reviewing, or Replace All to apply the change throughout the chosen scope. Excel reports how many replacements it made.
For example, if a workbook uses the department label Cust. Support and the approved label is Customer Support, enter the old label as the search text and the new label as the replacement. Use Replace to inspect a few results when similar text might have different meanings. Replace All is appropriate when you have confirmed that every exact match should change.
How to use Ctrl+H safely
- Save the workbook, or make a copy if the change is important or difficult to reverse.
- Press Ctrl+H and check that the Replace tab is selected.
- Enter the exact text to locate in Find what and the intended new text in Replace with.
- Open Options if you need to limit the search by worksheet, matching rules, or content type.
- Use Find Next or Replace to verify results first. Choose Replace All only when the matches are all meant to change.
- Check a few affected cells after the operation. If the result is wrong, use Ctrl+Z immediately to undo it.
Be especially careful with short search terms such as in, a single digit, or a punctuation mark. Those strings can occur inside longer words, dates, identifiers, and formulas. A search for 1, for instance, might match more cells than a reader expects. The match options and a preview through Find Next help reduce accidental edits.
Choose the search scope and matching options
Expand Options in the dialog to see controls that affect what Excel considers a match. The Within setting lets you search the current sheet or the workbook. The current sheet is the usual scope; choose Workbook when you need to search across sheets. If a particular range is selected before opening the dialog, Excel may restrict the search to that selection, so look at the active selection when results seem incomplete.
The Search setting controls whether Excel searches by rows or by columns. It changes the order in which matches are visited, not the cells included in the search. Match case distinguishes uppercase and lowercase letters. Match entire cell contents limits results to cells whose complete contents match the search text; without it, a shorter term can match part of a longer cell entry.
The Look in setting determines what Excel searches, such as formulas or displayed values. This distinction matters in a cell containing a formula: the visible result might be a name or number, while the underlying formula contains different text. If a search does not find what you can see, or finds formula text you did not expect, inspect Look in and try the relevant setting. Available labels can vary slightly by Excel build and context.
Use wildcards for flexible matches
Excel Find and Replace supports wildcard characters when you need to match a pattern rather than a fixed string. An asterisk (*) stands for any number of characters, including none. A question mark (?) stands for one character. For example, searching for Sam* can find entries beginning with Sam, such as Sam Lee or Samantha, depending on the cell contents and match settings.
To search for a literal asterisk or question mark rather than use it as a wildcard, put a tilde (~) before it. For instance, search for ~* to locate an actual asterisk character. The tilde itself can be searched using ~~. These rules are helpful in product codes or imported data where punctuation is part of the real value.
Wildcards can make Replace All especially broad. A pattern such as * can match extensive cell content, so do not use it casually as a replacement search. Start with Find Next or Find All, verify the results, and use a copy of the workbook for any pattern-based cleanup that could affect important data.
Replace text, formulas, or formatting
Find and Replace can work with worksheet content as well as formatting criteria. To search for formatting, open the dialog’s Options and use the Format controls beside the search or replacement fields. You can specify a format to find and, where needed, a different format to apply. This can help locate cells with a particular number format, font, fill, or other formatting attribute without searching for a particular word.
When searching in formulas, replacement can alter the formula text itself. For example, changing a referenced sheet name or a repeated text fragment in formulas may be useful, but an overly general replacement can change references or expressions in unintended ways. Review representative formulas and use Find Next before replacing across a workbook. A displayed number may be the result of a formula rather than text stored directly in the cell, so replacing the visible result is not always the same as changing the underlying formula.
Also distinguish a true replacement from a formatting cleanup. If the goal is to change a value, fill in Replace with. If the goal is to change formatting, set the replacement format explicitly and confirm the search format is not left over from an earlier operation. Excel can retain Find and Replace settings between uses, so check old criteria if a new search behaves unexpectedly.
Common problems and how to fix them
- No matches appear: Check for extra spaces, spelling differences, the selected range, and whether Within is set to Sheet or Workbook. Also verify Look in, Match case, and Match entire cell contents.
- Only some expected cells change: The search may be limited to a selection or worksheet, or the matching text may not be identical. Search the workbook and use Find All to inspect the locations Excel recognizes.
- Too many cells change: The search text may be a substring of longer entries, or a wildcard may be active. Undo with Ctrl+Z, then use Match entire cell contents or a more specific search.
- The result does not look like the cell’s displayed value: Check whether Look in is set to formulas or values. A cell’s formula, stored value, and displayed formatting can differ.
- Replace All seems to do nothing: Confirm that Find what is not blank by accident, that the correct workbook or sheet is active, and that the intended content type is being searched.
Excel normally lets you undo a replacement with Ctrl+Z, but do not treat undo as a substitute for checking the scope. Subsequent actions can affect your undo history, and a saved copy gives you a safer recovery point for large or sensitive edits.
Shortcuts on Mac and Excel for the web
In Excel for Mac, the Replace shortcut is generally Control+H, and Find is generally Control+F. Mac keyboard behavior can depend on the Excel version and keyboard configuration. If the shortcut does not open the expected dialog, use the ribbon’s Home > Find & Select > Replace command, or the relevant Find command, rather than assuming that a Windows shortcut will behave identically. The Command key is not a direct substitute for Ctrl in every Excel shortcut.
In Excel for the web, browser shortcuts can overlap with browser commands, so the ribbon is a dependable way to open the feature: choose Home > Find & Select and then the available Replace command. The web app’s interface and keyboard support can differ from desktop Excel, and some options may be presented differently. If you need a specific advanced search setting that is not available in the web interface, open the workbook in the desktop app.
Frequently Asked Questions
What is the Excel shortcut for Find and Replace?
On Windows, press Ctrl+H to open the Replace tab. Ctrl+F opens Find. In Excel for Mac, Control+H is generally the Replace shortcut.
How do I replace all occurrences in Excel?
Press Ctrl+H, enter the old and new text, check the scope and options, and click Replace All. Review the result count and inspect affected cells, especially when the search term is short.
Can I use Find and Replace across every sheet?
Yes. In the expanded Options, set Within to Workbook rather than Sheet. Check that setting before replacing, because a workbook-wide change can affect sheets beyond the one currently visible.
Why does Excel not find text that is visible in a cell?
The Look in setting may be searching formulas instead of displayed values, or the text may be part of a formula result. Check the selected range, search scope, spelling, spaces, and match options as well.
Can I undo Replace All?
Usually, press Ctrl+Z immediately after the replacement. For a major change, save a separate copy first; undo history is not a reliable backup if you continue working or close the workbook.
Related
- Excel Circular Reference Workarounds That Actually Work
- Excel Scatter Plot by Third Column: Color Points by Group
- Excel Circular Reference When There Are None?
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 Make a Flowchart in Word 2019, Step by StepTo make a flowchart in Word 2019, choose Insert > Shapes, select a flowchart shape, and draw it…
- Excel Very Slow Saving Files? Causes and FixesIf Excel is very slow saving files, first save a copy to a local folder and compare the…
- How to Change Zoom in OutlookTo change the size of an email in classic Outlook for Windows, open the message in its own…
- Excel Text Overflow: How It Works and How to Control ItYes. In Excel, text can visually overflow into the cell to its right when that neighboring cell is…
- Can You Custom Freeze Panes in Excel? Here’s HowYes. In Excel for Microsoft 365 on Windows, select the cell immediately below the rows and to the…
- SUMIF Negative Values in Google Sheets: ExamplesIf your values are in A2:A7, enter =SUMIF(A2:A7,"<0") to add only the negative numbers; for example, -12, 8,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.