In Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace, then enter the text to find and its replacement. Press Enter or click Replace to change one match, or choose Replace All to change every match in the selected search area.
Find and Replace keyboard shortcuts
The two shortcuts serve related but different purposes: Ctrl+F opens the Find tab so you can locate content, while Ctrl+H opens the Replace tab so you can locate and change it. In the Replace tab, the Find what box contains the existing text and Replace with contains the new text. You can move between the boxes with the Tab key.
On a Mac, Excel commonly uses Control+H for Replace and Command+F for Find. Keyboard assignments can vary with the Excel version, keyboard layout, or system settings. If a shortcut does not open the expected command, use the ribbon instead: Home > Find & Select > Replace. In Excel for the web, the ribbon route is also a dependable option because browser shortcuts can compete with spreadsheet shortcuts.
After opening the dialog, you can use the buttons or keyboard navigation. Find Next selects the next match without changing it. Replace changes the current match and moves to another one; Replace All makes all matching changes in the search scope. Excel normally reports how many replacements it made, which is useful for checking whether the result seems plausible.
How to replace text safely
For a controlled change, inspect matches before replacing them all. This is especially sensible in a workbook containing formulas, imported data, or names that may appear in several contexts.
- Click a cell in the worksheet, then press Ctrl+H.
- Enter the existing text in Find what and the intended new text in Replace with.
- Choose Find Next to check a match. If it is the right one, select Replace; repeat as needed.
- When you have confirmed the search terms and scope, choose Replace All for the remaining matches.
- Review Excel’s replacement count and scan the affected cells. If the result is wrong, use Ctrl+Z promptly to undo the operation.
For example, suppose a sheet contains product codes such as North-100, North-205, and South-100, and you need to change only the North prefix to West. Searching for North- and replacing it with West- targets both North codes without changing South-100. Searching for just 100 would be broader and could alter unrelated entries, so use the most specific distinctive text that fits the task.
Choose the search scope and content type
Excel can search the current worksheet or the whole workbook. In the Find and Replace dialog, select Options to reveal settings such as Within, where you can choose Sheet or Workbook. Choose Sheet for a local cleanup; choose Workbook when the same text needs to change across multiple worksheets. A workbook-wide replacement can have a much larger impact, so check the scope before selecting Replace All.
The same options area includes Search, which sets whether Excel searches by rows or columns, and Look in, which controls the kind of cell content searched. Depending on the Excel interface and content, choices include formulas, values, and notes. Searching in formulas can find text that is part of a formula’s written expression. Searching in values is useful when you want to find displayed or calculated cell results rather than formula text. Notes are a separate search target from ordinary cell values.
Options can carry over from one search to another. If Excel seems to miss a match, open Options and check the selected worksheet or workbook scope, search direction, and Look in setting. Also check whether the search is limited to a selected range. To avoid an unintended narrow search, click a single cell before opening the dialog unless you deliberately want to work within a selection.
Match exact cells, case, and partial text
By default, a search can find the search string within a longer cell entry. Searching for cat, for instance, may find a cell containing catalog as well as one containing only cat. Turn on Match entire cell contents when you want to match a whole cell rather than a substring. This is useful for replacing a category label such as Pending without touching a longer label such as Pending review.
Select Match case when uppercase and lowercase letters should be treated as different. Without that setting, a search for west can match entries whose capitalization differs. Case matching is helpful with codes or text conventions, but it does not make Excel’s search a general linguistic or spelling-aware tool: it looks for text according to the chosen search settings.
Excel also supports wildcard searches. An asterisk * represents any number of characters, and a question mark ? represents one character. For example, searching for AB* can find entries beginning with AB, while Item-? can match a one-character suffix. If you need to search for a literal asterisk, question mark, or tilde, precede it with a tilde: ~*, ~?, or ~~. Wildcards can make a broad replacement powerful, but they also make it easier to change more cells than intended; test with Find Next first.
Replacing text in formulas, numbers, and formatting
Find and Replace is not limited to plain text labels. It can search formula text as well as cell values, and the choice of Look in matters. A replacement made while searching formulas can modify the formula expression itself. For example, replacing a text fragment that appears in a formula may change a referenced sheet name, a text constant, or another part of the expression. Inspect formulas before a broad change, and avoid replacing short fragments that could occur in many unrelated formulas.
Numbers require a little care. A cell may contain a numeric value, a formula result, or text that looks like a number; those are not interchangeable. If you are changing a label or a text-formatted identifier, confirm that Excel is searching the appropriate content. Replacing a substring in a value is also different from changing its number format. Find and Replace can search for formatting through the dialog’s format controls, but a displayed difference caused only by formatting may not be fixed by replacing the underlying text.
When formatting is the issue, open the dialog’s Options and use the Format controls associated with the Find or Replace boxes to specify formatting criteria. You can search for cells with particular formatting and apply replacement formatting. Clear any previously selected format criteria if you meant to perform a text-only search; otherwise, Excel may restrict matches to cells that also meet those format conditions.
Common problems and how to avoid them
- Replace All changes too much: Undo immediately with Ctrl+Z, then narrow the search string, turn on Match entire cell contents, or restrict the search to a worksheet or range.
- Excel reports no matches: Check for a typo, extra spaces, the selected search scope, the Look in setting, and any Match case or formatting criteria.
- Only some expected cells change: Some entries may be formulas, values, or differently formatted cells, or the search may be limited to a selection. Review the options and test each type of entry with Find Next.
- Formulas stop returning the expected result: A replacement may have altered formula text. Undo the change and use a narrower search, or edit the affected formulas individually.
- A wildcard search returns surprising matches: Remember that * can cover many characters and ? covers one. Use Find Next to verify the pattern before using Replace All.
Before a large workbook-wide replacement, save the workbook or make a copy. Undo is useful for reversing a recent replacement, but it is not a substitute for a recovery copy if you continue editing, close the file, or discover the problem later. A quick check of the replacement count and several representative cells can catch errors before they spread into reports or downstream calculations.
Find versus Replace, and other ways to edit
Use Find when you need to locate information but do not want to modify it. You can move through occurrences with Find Next or use Find All to see a list of matches in the dialog. Use Replace when the content itself needs to change. This distinction matters when auditing a workbook: locating a phrase is low risk, while replacing it can affect formulas, labels, and multiple sheets.
For a one-off correction in a single cell, editing the cell directly may be clearer than opening the dialog. For a repeated transformation based on a rule—for example, cleaning many inconsistent values—Power Query or a formula in a separate column may provide a more reviewable process. Those alternatives are not necessary for a simple global text correction, but they can be preferable when you need repeatability, a preview, or a record of how source data was transformed.
Frequently Asked Questions
What is the shortcut for Find and Replace in Excel?
On Windows, press Ctrl+H. On Mac, Excel commonly uses Control+H; if that does not work in your setup, open Home > Find & Select > Replace.
What is the shortcut for Find only?
Press Ctrl+F on Windows. On Mac, use Command+F. These open the Find interface without starting a replacement.
Can I replace text in every sheet at once?
Yes. Open Options in Find and Replace, set Within to Workbook, and then use Replace or Replace All. Verify the search terms first because this can change matches on multiple worksheets.
How do I replace only a complete cell entry?
In Find and Replace, open Options and select Match entire cell contents. This prevents a search term from matching merely as part of a longer cell entry.
Can I undo Replace All?
Usually, yes: press Ctrl+Z on Windows or use the Undo command on Mac soon after the replacement. If you have made other changes since then, undo may also reverse those later actions, so save a copy before a high-impact replacement.
A quick pre-replacement checklist
Before applying a broad change, confirm the exact old and new text, whether partial matches are acceptable, whether case matters, and whether the target is a worksheet or the whole workbook. Check the content type and any lingering format criteria, then preview a few results with Find Next. These small checks preserve the speed of Ctrl+H while reducing the chance of silently changing unrelated data.
Related
- How to Enter a Page Break in Excel and Control Printing
- Excel Data Validation Lists Based on Criteria
- Excel Data Validation List: How to Add a Blank Option
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Create a Filter View in Google Sheets: Steps & TipsTo create a filter view in Google Sheets, open the spreadsheet in a desktop web browser, select a…
- Google Sheets Conditional Formatting on Your PhoneYes—Google Sheets conditional formatting can be used on a phone, though the available controls depend on your device.…
- How to Get Out of Replace Mode in Excel and Restore TypingTo get out of Overtype (replace) mode in Excel for Microsoft 365 on Windows, click inside the cell…
- Compare Two Excel Sheets and Find Every DifferenceTo compare two Excel sheets, use a cell-by-cell formula when the rows line up, or match records by…
- COUNTIF TRUE in Google Sheets: Count Boolean ValuesTo count cells whose value is the Boolean TRUE in Google Sheets, use =COUNTIF(A2:A20,TRUE), replacing A2:A20 with your…
- Excel Page Break Button Locked? Common Causes and FixesIn Excel for Microsoft 365 on Windows, the Page Break command is usually unavailable because Excel is editing…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.