To find and replace text in Microsoft Excel for Microsoft 365 on Windows, press Ctrl+H, enter the text to find and its replacement, then choose Replace or Replace All. You can also open the tool from Home > Find & Select > Replace; check its search options before replacing many cells.
What Find and Replace Does
Excel’s Find and Replace tool searches worksheet content for a character, word, number, or pattern, then lets you locate matches or substitute new content. It is useful for correcting a recurring typo, updating a product code, changing a department name, or standardizing punctuation across a list. It can also search formulas and cell formatting, not just visible text, depending on the options selected.
Finding and replacing is different from changing how a value looks. For example, if a cell contains the number 0.25 and is formatted as a percentage, it displays as 25%. Replacing 25% is not necessarily the way to change its underlying value or number format. Similarly, changing a displayed result from a formula is different from editing the formula that produced it. Knowing what Excel is searching helps prevent unintended edits.
How to Find and Replace Text
- Select the worksheet or range you want to search. If you select a range, Excel can limit the operation to that selection; otherwise, it searches the applicable worksheet or workbook scope.
- Press Ctrl+H, or choose Home > Find & Select > Replace.
- In Find what, enter the existing text, number, or pattern. In Replace with, enter the new content. Leave the replacement box empty if you intend to remove matching content.
- Choose Find Next to inspect a match, or Find All to see a list of matching cells. Use Replace to change the current match one at a time.
- Choose Replace All only after checking the search scope and options. Excel reports how many replacements it made.
For example, suppose a worksheet uses “North District” in several notes and labels, and the name changes to “Northern District.” Enter the old name in Find what and the new name in Replace with. Using Find Next first lets you confirm Excel is finding the intended wording before you make a change. If the match list is correct and the replacement should apply everywhere in scope, Replace All is faster.
In Excel for Mac, the labels and dialog arrangement can differ slightly. Use the workbook’s Edit or Home menu to open Find and Replace; the keyboard shortcut may depend on the keyboard and Excel version. Excel for the web provides Find and Replace through the Home tab, though some advanced search options can differ from the desktop app.
Replace One Match or Every Match?
Replace changes the current match and gives you a chance to inspect the next one. It is the safer choice when a word might appear in different contexts, such as “May” as a month and “may” as a verb, or when some records should remain unchanged. You can step through the results, replacing only the occurrences that are genuinely relevant.
Replace All changes every match in the selected search scope without asking you to approve each cell. That can save time for a precise global update, but it is easy to change more than intended. Before using it, consider whether the search term could appear inside longer words, identifiers, formulas, or unrelated entries. A search for “cat,” for instance, may also match “category” unless you select Match entire cell contents or otherwise narrow the search.
Excel’s replace action can generally be reversed immediately with Ctrl+Z on Windows or Command+Z on Mac. Undo is not a substitute for reviewing the scope: later workbook actions can affect the undo history, and changes made by some macros cannot be undone with the normal Undo command. Save a copy before making broad or high-impact replacements.
Search Scope and Matching Options
Expand the Find and Replace dialog’s options to control where and how Excel searches. Names and availability can vary slightly by platform or update, but the main settings are designed to prevent accidental matches:
- Within: Choose the current sheet or the workbook when that choice is available. A workbook-wide search can update multiple sheets, so verify the scope before replacing.
- Search: Choose whether to search by rows or by columns. This affects the order in which Excel moves through matches; it does not change which cells qualify.
- Look in: Choose the type of cell content to search, such as formulas, values, or comments/notes where supported. The available choices can differ between Excel versions.
- Match case: Make the search case-sensitive. Use it when “ID” and “id,” for example, must be treated differently.
- Match entire cell contents: Find a cell only when its complete contents match the search text. This helps distinguish “West” from “Western,” but it is not a general-purpose way to match a phrase embedded in a longer cell.
A selected range is also important. If you select a block of cells before opening Replace, Excel can confine the operation to that selection rather than searching every cell in the sheet. If you intended to search the full worksheet, click a single cell or clear the selection first, then confirm the dialog’s Within setting. Always inspect the replacement count and, for critical data, review the affected cells afterward.
Searching Formulas, Values, and Comments
Cells can contain formulas while displaying calculated results. A cell might show “Complete” but contain a formula that refers to another cell. If Look in is set to formulas, Excel searches the formula text; if set to values, it searches the displayed or calculated content where supported. These choices are not interchangeable. A replacement aimed at formula text can alter the formula itself, so be especially cautious when searching for short strings such as “A1” or “1.”
For instance, a formula may refer to a worksheet named “Old Rates.” Replacing that phrase while searching formulas could update references, but a broad search for “Old” might affect other formula text or labels too. If the goal is to change a formula’s result, identify the source cells and logic instead of assuming Replace can edit the result directly. For a workbook with many linked formulas, test the change on a copy and check important calculations afterward.
Comments and notes are another possible search location in desktop Excel. A comment is a threaded discussion, while a note is the older cell annotation style; their handling and availability in Find and Replace may depend on the version. If a term cannot be found despite being visible in a comment or note, check the Look in setting and whether that content type is included in the current Excel interface.
Wildcards and Special Characters
Excel supports wildcard characters in Find and Replace. An asterisk (*) represents any number of characters, and a question mark (?) represents one character. This can be useful when the exact text varies but follows a recognizable pattern. For example, searching for INV-* can find entries that begin with “INV-” followed by different characters. A search for 202? can match four-character entries beginning with “202,” such as “2024.”
Wildcards can also create surprises. A search for just * is broad, and replacing wildcard matches may affect more content than expected. To search for a literal asterisk, question mark, or tilde rather than use it as a wildcard, place a tilde before it: ~* searches for an asterisk, ~? for a question mark, and ~~ for a tilde. Use Find Next or Find All to check what a wildcard pattern matches before choosing Replace All.
Replacing Cell Formatting
Find and Replace can search for formatting as well as content. In the dialog, use the Format controls associated with Find what or Replace with to specify a format to find or apply. This is useful when a particular fill, font, or number format is repeated and needs to be changed across many cells. The exact formatting choices depend on the Excel version and dialog.
When a format criterion is active, Excel may find cells based on that formatting even if the text box is blank. If results seem unexpected, reopen the format controls and clear the criteria before trying a text search. A formatting replacement can also overwrite formatting that was intentionally different, so search a limited range first or inspect matches before applying it across a workbook.
Common Problems and Safe Fixes
- Excel says no matches were found: Check spelling, spaces, the selected range, case sensitivity, Match entire cell contents, and the Look in setting. A value shown on screen may come from a formula rather than typed text.
- Too many cells changed: Undo immediately if possible, then repeat with a selected range, a more specific search phrase, case matching, or entire-cell matching. Use Find All to review the targets first.
- Only part of a cell changed: This is normal when the search text is contained within a longer cell and entire-cell matching is off. Use a more exact phrase or enable the whole-cell option where appropriate.
- Numbers or dates do not match as expected: Excel stores dates and numbers as values, while formatting controls how they appear. Check whether the search is looking in values or formulas and consider whether the visible text is only a formatted display.
- The search keeps using an old format: Clear any Find or Replace formatting criteria in the dialog. Formatting criteria can persist and affect later searches.
For lists that need consistent cleanup, also look for leading or trailing spaces, inconsistent abbreviations, and spelling variants. Replace is a literal editing tool, not a full data-cleaning system: it does not automatically decide whether two different labels mean the same thing. Keep an untouched source copy when the data is important, and check totals, formulas, and sample records after a large change.
When to Use Another Excel Tool
Find and Replace is best for direct, one-time edits to existing cell contents. Use Find when you only need to locate information without changing it. Use filters or sorting when you need to inspect and select records based on their values before editing. If you want to transform text while retaining the original column, Excel text functions or Power Query may be more suitable than replacing source data directly.
Power Query is useful for repeatable data-import and cleanup steps, especially when the same transformation must be applied each time new data arrives. A formula-based helper column is useful when you want to compare the transformed result with the original before committing changes. These approaches take more setup than Ctrl+H, but they can make a recurring process easier to audit and repeat. Choose the simplest method that preserves the original information and makes the scope of changes clear.
Frequently Asked Questions
What is the shortcut for Find and Replace in Excel?
On Windows, press Ctrl+H to open Replace. On Mac, use the Find and Replace command from Excel’s menus if the shortcut differs in your version or keyboard setup.
How do I replace text in only one column?
Select the cells in that column that you want to edit, then open Find and Replace and confirm the selected range is the intended scope. Test with Find Next before using Replace All.
Can Excel replace text in every sheet at once?
Yes, when the Within option offers Workbook, choose it instead of Sheet. Review the results carefully because matching content on other worksheets may also change.
How do I find a question mark or asterisk literally?
Use a tilde before the character in the search text: ~? for a question mark or ~* for an asterisk. Without the tilde, those characters act as wildcards.
Can I undo Replace All?
Usually, press Ctrl+Z on Windows or Command+Z on Mac immediately after the replacement. Save a backup before a large edit, and do not rely on standard Undo to reverse changes made by a macro.
Related
- Excel Slicer: Connect One Slicer to Multiple PivotTables
- Excel Shortcut to Go to a Named Range
- Excel Showing Page Break Lines? How to Hide Them
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Hide Shortcut: Hide and Unhide Rows or ColumnsIn Excel for Microsoft 365 on Windows, press Ctrl+9 to hide the selected row or rows, and Ctrl+0…
- Copy and Paste Word to Excel: Tables, Text, and FormattingTo copy content from Word to Excel, select the text or table in Word, press Ctrl+C, click the…
- How to Schedule Send an Email in the Microsoft Outlook AppTo schedule an email in Outlook, write your message, open the menu beside Send, choose Schedule send, and…
- Google Sheets IF Zero: How to Handle Zero Values in FormulasTo test whether a cell equals zero in Google Sheets, use an IF formula such as =IF(A2=0,"Zero","Not zero").…
- How to Freeze a Line in Excel: Freeze Rows or ColumnsTo freeze a line in Excel, open View > Freeze Panes and choose Freeze Top Row or Freeze…
- Split Data in Google Sheets: Methods and FormulasTo split text into separate columns in Google Sheets, select the cells, then choose Data > Split text…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.