Excel Find and Replace Exact Match: What to Know

Formulas & functions · Updated November 3, 2026

Excel Find and Replace Exact Match: What to Know

To find or replace a cell only when its entire contents match, press Ctrl+H in Excel for Microsoft 365 on Windows, select Options, and check Match entire cell contents. Enter the text in Find what and, if replacing, in Replace with; then choose Find Next, Replace, or Replace All.

What “exact match” means in Excel

The checkbox makes Find and Replace compare your search with the whole cell content rather than matching a piece of text inside a longer entry. For example, searching for cat without the option can find the word within catalog. With Match entire cell contents enabled, a cell containing only cat is a match, while catalog and black cat are not.

This setting concerns the contents of a cell; it is not a general guarantee that every aspect of two cells is identical. It does not by itself require matching capitalization, formatting, or data type. Those details are handled separately or may affect which text Excel searches. The checkbox is also different from a formula comparison such as checking whether a cell equals a particular value: it is an option in the Find and Replace dialog.

Use the setting when you need to update a complete status, label, code, or category without changing longer entries that happen to contain the same characters. For instance, replacing Open with In progress should not change Open house if you intend to update only cells whose entire contents are Open.

How to turn on the exact-cell option

In Excel for Microsoft 365 on Windows, open the worksheet and follow these steps:

  1. Press Ctrl+H, or select Home > Find & Select > Replace.
  2. Type the target text in Find what. If you are replacing it, enter the new text in Replace with.
  3. Select Options to show the additional settings if they are hidden.
  4. Check Match entire cell contents. Review other options such as Within and Look in before running the search.
  5. Choose Find Next to inspect matches one at a time, Find All to list them, or Replace to change one match. Use Replace All only after you are confident the scope and settings are right.

On a Mac, use Excel’s Edit > Find > Replace menu or the Replace command in the Home ribbon; menu layout and shortcuts can vary by Excel version and keyboard settings. Look for the same Match entire cell contents option in the expanded dialog. In Excel for the web, open Find and Replace from the Home ribbon and check the available options; the interface can differ from the Windows desktop dialog, so confirm that the whole-cell matching option is available before relying on it. If it is not shown, use the desktop app for this task.

Choose the search scope before replacing

An exact match can still change more cells than you intended if the search scope is too broad. In the dialog, Within controls whether Excel searches the current sheet or the workbook. A workbook-wide replacement can affect sheets that are not currently visible, so check the scope before selecting Replace All.

You can also limit the operation by selecting a range before opening Find and Replace. This is useful when only one column or a specific block of records should be updated. After selecting a range, verify that Excel is searching that selection rather than the whole sheet, and avoid assuming that a highlighted cell alone limits the search. For a high-impact change, make a copy of the workbook or save a version first.

  • One sheet: Use the sheet scope when the update belongs only on the active worksheet.
  • Entire workbook: Choose this only when every relevant sheet should be searched. Check hidden sheets and similarly named fields.
  • Selected range: Select the intended cells first, then confirm the dialog’s scope and test a match before replacing.

Exact match, capitalization, spaces, and formats

Match entire cell contents does not automatically make the search case-sensitive. If the capitalization matters, also select Match case. For example, with whole-cell matching enabled, a search for north can still match a cell containing North unless case matching is enabled. With both options selected, the capitalization and the full cell content must meet the search criteria.

Spaces are content too. A cell containing Open is different from one containing Open with a trailing space, or Open with a leading space. A search that looks visually identical may therefore miss entries with extra spaces or nonprinting characters. If you suspect inconsistent imported data, inspect the cell in the formula bar or clean a copy of the data before making a broad replacement. Find and Replace is not a general-purpose tool for diagnosing every invisible character.

Formatting is another separate issue. A number displayed as 0012 may be stored as the number 12 with a number format, or as text containing four characters. These are not necessarily the same underlying content. Dates can likewise be stored as serial numbers and displayed in different date formats. If a search behaves unexpectedly, check the cell’s actual value and the dialog’s Look in setting rather than assuming that the visible appearance tells the whole story.

What Excel searches: values and formulas

The Look in setting determines what Excel searches. When it is set to Formulas, Excel can search formula text as well as ordinary cell entries. For example, a formula may contain the word or reference you are looking for even if the result displayed in the cell is something else. Replacing text while searching formulas can modify formulas, so use extra care and inspect matches before changing them.

When the setting is Values, the search concerns cell results rather than the formula expression. This is useful when you want to find a calculated result, but number formatting can make the visible display differ from the underlying value. The dialog’s other settings and the selected scope still apply. If you are unsure whether a match represents a formula or a displayed result, use Find All and inspect the listed cells before replacing anything.

Excel versions may show additional choices related to notes or comments in the search dialog. These are distinct from searching worksheet cell values. If your task involves annotations rather than cell contents, choose the appropriate search target and check the results instead of assuming the whole-cell option applies in the same way.

Wildcards and literal characters

Excel Find and Replace supports wildcard characters in searches: an asterisk (*) can represent any number of characters, and a question mark (?) can represent one character. A tilde (~) is used to search for a wildcard character literally. For example, ~* searches for an asterisk character rather than treating it as a pattern.

Wildcards are useful for finding entries that follow a pattern, but they can make a search broader than a literal exact-text search. With whole-cell matching selected, a wildcard pattern can still describe a complete cell whose contents fit that pattern; it does not turn the wildcard into an ordinary character. If the target contains an actual asterisk, question mark, or tilde, escape it as appropriate and test with Find Next first. For a strict replacement of a literal string, avoid wildcard characters unless you specifically need pattern matching.

Replace All safely and check the results

Replace All applies the replacement to every match in the active search scope. Excel reports how many replacements it made, but a count alone does not prove that the right cells changed. A safer workflow is to use Find All first, review the results, and then replace one match to confirm the outcome. This is especially important for product codes, imported data, formulas, and workbooks with many sheets.

  • Save the workbook or create a copy before a large or workbook-wide replacement.
  • Confirm the search text, replacement text, whole-cell option, case option, and search scope.
  • Use Find All to check which cells are included, then inspect representative results.
  • Run Replace on one match before deciding whether to use Replace All.
  • Review the replacement count and spot-check the affected cells afterward.

In many ordinary worksheet edits, Ctrl+Z (Undo) can reverse a replacement, including a Replace All operation. Do not treat Undo as your only safety net: later actions can complicate recovery, and saving, closing, or other workflow changes may make it harder to restore the original state. Keeping a backup is the more dependable precaution when the data matters.

Common reasons an exact match is missed

If Excel does not find an entry that appears to match, first confirm that Match entire cell contents is checked only when you actually need whole-cell matching. Then check whether the cell has extra spaces, different capitalization with Match case enabled, or a formula whose result differs from its formula text. Also verify that Within points to the right sheet or workbook and that Look in targets values or formulas as intended.

Another frequent source of confusion is searching a visually formatted value. A cell may display a date, percentage, or zero-padded code in a way that differs from its stored value. Use the formula bar and inspect the cell format when the displayed text does not behave as expected. Finally, clear or review any formatting criteria in the Find dialog if you previously used format-based searching; a format condition can narrow results even when the text looks correct.

Frequently Asked Questions

Does Excel Find and Replace have an exact-match option?
Yes. In the expanded Find and Replace dialog, select Match entire cell contents. That limits the match to cells whose contents meet the search criteria, rather than matching a substring inside a longer entry.

How do I replace a word only when the cell contains that word?
Press Ctrl+H on Windows, enter the word, select Options, and check Match entire cell contents. Use Find Next or Find All to verify the matches before choosing Replace or Replace All.

Does exact match distinguish uppercase and lowercase?
Not by itself. Select Match case as well if capitalization must be identical. Whole-cell matching and case matching control different aspects of the search.

Can I search for an exact number or date?
You can search worksheet contents, but numbers and dates may be stored differently from how they appear on screen. Check whether the cell contains a numeric value or text, review its number format, and confirm the Look in setting if Excel does not return the expected match.

Can I undo Replace All?
Ctrl+Z usually undoes a recent replacement in Excel, but it is safer to save a copy before a large operation. Undo is not a substitute for checking the scope and previewing the affected cells.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.