Excel Find and Replace Entire Cell Contents

How-to basics · Updated November 3, 2026

Excel Find and Replace Entire Cell Contents

To replace a cell only when its entire contents match, press Ctrl+H in Excel for Microsoft 365 on Windows, select Options if needed, check Match entire cell contents, enter the old and new text, then choose Replace or Replace All. This prevents a search for East, for example, from changing East in a longer entry such as Eastern Region.

What Match entire cell contents means

Excel’s Find and Replace tool can match a search term inside a cell or require that the whole cell match it. With Match entire cell contents turned off, searching for North can find North in North Office, Northwest, or a sentence that contains the word. With the option turned on, the cell must match the search entry as a whole for Excel to treat it as a match.

This is a matching rule, not a command to replace every character in a cell regardless of what is there. If a cell contains North Office and you search for North with the option enabled, Excel leaves it unchanged. If a cell contains only North, Excel can replace it with the replacement text. Any spaces or other characters included in the cell also matter: a cell containing North followed by a space is not necessarily an exact match for North.

The option is useful for controlled cleanup, such as changing a status label from Pending to In progress without altering a longer note that happens to contain the word Pending. It is also helpful when standardizing a category, department name, or short code across a worksheet.

Steps to replace exact cell contents

  1. Save the workbook, or make a copy if the change could affect many cells.
  2. Press Ctrl+H, or go to Home > Find & Select > Replace.
  3. In the Find and Replace dialog, enter the existing cell content in Find what and the desired content in Replace with.
  4. Select Options if the additional settings are hidden, then check Match entire cell contents.
  5. Review the other search settings, especially the search scope and Look in setting.
  6. Choose Find Next to inspect a match, Replace to change one cell at a time, or Replace All to apply the change to every match in the selected scope.

Excel reports how many replacements it made after Replace All. Treat that number as a useful check, not proof that the result is correct: inspect representative cells, especially when the workbook contains formulas or several similar categories. You can close the dialog and use Ctrl+Z to undo a replacement if you have not made another change that prevents the undo.

Choose the right search scope

Find and Replace can work within the current worksheet or across the workbook, depending on the setting in the dialog. Check the Within option before replacing. If it is set to Sheet, the search is limited to the current sheet; if set to Workbook, it can reach matching content on other worksheets. A change intended for one table can therefore spread much further if the scope is broader than expected.

You can also select a range before opening Replace. A selected range helps narrow the operation, but confirm the scope shown in the dialog rather than assuming the selection has limited every setting. For a high-impact replacement, begin with Find Next and verify that the first result is in the intended area.

On Excel for Mac, use the Find and Replace controls from the Edit menu or the Home tab, depending on the ribbon layout. The dialog includes the same kind of matching option, though its placement and labels can vary slightly by build. In Excel for the web, use the ribbon’s Find and Replace command; Ctrl+H in a browser may open browser history instead of Excel’s replacement tool.

What Excel considers a match

Exact matching concerns the cell’s contents, not just the visible fragment you happen to notice. A trailing space, a different punctuation mark, or an extra word can prevent a match. For example, searching for 0042 will not necessarily match a cell whose underlying numeric value is 42 and whose number format displays it as 0042. The display format can make two cells look alike even when their stored contents differ.

By default, Excel searches without distinguishing uppercase and lowercase letters. If the difference matters, open Options and select Match case as well as Match entire cell contents. For example, a case-sensitive search for Code will not match a cell containing code. These are separate controls: whole-cell matching governs how much of the cell must match, while Match case governs capitalization.

Excel also supports wildcard characters in searches. An asterisk can represent a sequence of characters, and a question mark can represent one character. A tilde can be used to search for a literal wildcard character. If your search text contains an asterisk or question mark that is meant literally, account for this before replacing; otherwise Excel may interpret it as a pattern. For a straightforward exact label replacement, use the literal label and avoid wildcard characters.

Cells, formulas, and displayed values

A cell may contain plain text, a number, a date, or a formula. The Look in setting controls what Excel searches, with options such as Formulas, Values, and Notes available in the Find and Replace options. In a formula cell, the formula text and the calculated result are different things. For example, a formula can display the word Complete while its formula contains a reference to another cell. Searching formulas is not the same as searching only what the worksheet displays.

Before replacing in a workbook with formulas, consider what the search setting will expose and test on a copy or a small range. Replacing text within formulas can change their logic or references, even if the visible results initially seem plausible. If your goal is to change a displayed value produced by a formula, edit the formula or its source data rather than assuming Replace will safely convert the result into a fixed value.

Dates and numbers deserve the same care. Excel stores dates as numeric values and displays them according to cell formatting. A date shown as 11/02/2026 might not be stored as that exact character string. Likewise, a percentage displayed as 25% may be stored as 0.25. If Find and Replace does not locate a value that appears on screen, check the Look in setting, the underlying cell type, and its number format.

Replace one match or replace all?

Replace changes the currently found match, allowing you to review each result in sequence. Replace All changes every match in the selected scope that meets the current search settings. For a short, well-understood list of identical labels, Replace All is efficient. For a large workbook, a broad search term, or any change involving formulas, review matches individually or test a copy first.

Consider a worksheet with cells containing Approved, Approved – pending signature, and Not approved. If you search for Approved with whole-cell matching enabled, only the cell whose contents are exactly Approved is eligible. Without that setting, a replacement may affect the longer entries too. This is why checking the option is valuable, but also why reviewing the number of matches and a sample of the results remains sensible.

Replace generally changes cell contents rather than applying a new format. Still, changing the kind of content can affect how it is interpreted or displayed. Replacing text with a number-like entry, for instance, may produce a different result depending on how Excel parses it and how the cell is formatted. Check the edited cells after replacement rather than relying only on what the dialog reports.

Common problems and safe checks

  • No matches appear: Confirm Match entire cell contents is appropriate, check for extra spaces, and review whether Excel is looking in formulas, values, or notes.
  • Too many cells change: Check whether the option was enabled, whether Match case is needed, and whether the search scope is Sheet or Workbook.
  • A number or date will not match what is displayed: Check its underlying value and number format; the displayed text may not be the stored content.
  • Formulas change unexpectedly: Review the Look in setting and undo promptly if appropriate. Test future replacements on a copy before applying them to formula-heavy workbooks.
  • Wildcard characters behave unexpectedly: Remember that * and ? can act as search patterns; use a tilde when you need to search for one literally.

For changes that matter, make a backup before using Replace All. A workbook copy also lets you compare the original and edited data. Excel’s undo command is useful, but it should not be treated as a substitute for a backup, especially if you continue working after the replacement.

When another method may be better

Find and Replace is suited to changing matching content in place. It is less suitable when the change depends on a rule, such as replacing one label only when a neighboring column has a particular value. In that case, a helper column with a formula, a filter followed by a carefully selected edit, or a Power Query transformation may offer more control. The right choice depends on whether the change is a simple text substitution or part of a broader data-cleaning process.

If you only need to inspect matches without changing them, use Find rather than Replace. If you need to change a formula’s logic, edit the formula directly and check its dependent results. If the source data is imported and will be refreshed, consider correcting the transformation or source rather than making a one-off replacement that could be overwritten later.

Frequently Asked Questions

How do I replace only an exact match in Excel?
Open Replace with Ctrl+H, select Options, check Match entire cell contents, enter the old and new content, and choose Replace or Replace All.

Does Match entire cell contents make the search case-sensitive?
No. It requires the whole cell to match but does not by itself distinguish uppercase and lowercase. Select Match case separately if capitalization matters.

Can Excel replace a word inside a longer cell entry?
Yes, when Match entire cell contents is off, Excel can find text within longer cell contents. Turn the option on when only a full-cell match should be eligible.

Why does Replace All find zero matches when the text looks identical?
The cell may contain extra spaces, a different underlying value, or a formula whose result merely looks like the search text. Check the search settings and the cell’s stored content.

Can I undo Replace All?
Usually, Ctrl+Z on Windows or Command+Z on Mac undoes the replacement if it is still the most recent undoable action. Saving a separate copy first is safer for broad or important edits.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.