Excel Find and Replace Across an Entire Workbook Safely

How-to basics · Updated November 3, 2026

Excel Find and Replace Across an Entire Workbook Safely

To find and replace text across an entire Excel workbook in Microsoft 365 for Windows, press Ctrl+H, expand Options, set Within to Workbook, enter the text in Find what and Replace with, then choose Replace All. This searches worksheets in the active workbook, rather than only the current sheet; review the matches and save a copy first if the change could affect important data or formulas.

What workbook-wide replacement means

Excel’s Find and Replace works on cell content. The Within setting controls whether Excel looks in the active worksheet or across the workbook’s worksheets. It does not mean every kind of text in the file: text inside a chart, shape, text box, header, footer, or other object may require a separate edit. Nor does the setting include other workbooks that happen to be open. It applies to the workbook in which you open the dialog.

That distinction matters when you are changing a company name, product label, department code, or spelling used on multiple tabs. If a workbook has sheets named January through December, selecting Workbook can replace a term throughout those sheets in one operation. If you leave the scope at Sheet, Excel changes only the active tab, even if the same term appears elsewhere.

Steps to replace text across the workbook

  1. Save the workbook. For a consequential change, use File > Save As to create a separate copy to check.
  2. Click a single cell in the workbook. This helps avoid accidentally limiting the search to a selected range of cells.
  3. Press Ctrl+H, or use Home > Find & Select > Replace.
  4. Select Options if the dialog’s search settings are collapsed. Set Within to Workbook.
  5. Type the original text in Find what and the replacement text in Replace with. Check the other options before changing anything.
  6. Choose Find All to inspect the matches, or choose Replace All to make the change immediately. Excel reports how many replacements it made.
  7. Check affected sheets and important results, then save the workbook when you are satisfied.

Replace All acts across the chosen search scope without asking you to approve each match. Use Find Next and Replace instead when you want to review and approve matches one at a time. This is slower, but useful when the same short text has different meanings in different cells.

Choose search options before replacing

The options in the expanded dialog determine what counts as a match. The defaults are suitable for many simple text edits, but they can produce surprising results in a large workbook.

  • Within: Choose Workbook for a multi-sheet search or Sheet to limit it to the current worksheet.
  • Search: This controls the search order, such as by rows or columns. It is mainly relevant when stepping through matches; it does not make a replacement safer by itself.
  • Look in: Choose whether Excel searches formulas or cell values. This affects whether a match is found in a formula’s text or in its calculated result.
  • Match case: Turn this on only when uppercase and lowercase letters must be treated as different.
  • Match entire cell contents: Turn this on when the cell must contain exactly the search text. When it is off, a search for cat can also match catalog or concatenate.

Excel can retain Find and Replace settings between uses, so do not assume the options are at their defaults. Check them each time, especially the workbook-versus-sheet scope and whether Match entire cell contents is selected. If you searched for a specific format previously, clear that formatting criterion before a text-only search.

Values, formulas, and calculated results

A cell can display a value produced by a formula while storing the formula itself. For example, a formula may combine a first name with a surname, while the cell displays the completed name. Searching in values looks at the calculated result; searching in formulas looks at the expression stored in the cell. Which setting is appropriate depends on what you intend to change.

Replacing text while looking in formulas can alter the formula itself. If the search term appears in a sheet reference, a text string inside a formula, or another part of an expression, replacing it may change the formula’s meaning or make it invalid. For instance, changing a sheet name inside formulas is sometimes a deliberate cleanup, but a broad replacement can also alter an unrelated formula that happens to contain the same letters.

For a change to source data, it is generally safer to replace values in the cells where that data is stored than to edit formulas that display or combine it. If you do intend to modify formulas, inspect the matches first, use a backup, and test representative results after replacing. Replacing visible text in a cell does not necessarily change the number format that controls how a number or date is displayed.

Wildcards and special characters

Excel Find and Replace supports wildcard characters. An asterisk (*) represents any sequence of characters, and a question mark (?) represents one character. These are useful for broad searches, but risky in a workbook-wide replacement because a pattern can match many different entries. For example, searching for prod* could match words that begin with prod, not just one exact label.

To search for a literal asterisk or question mark, place a tilde (~) before it. For example, search for ~? to find a question mark that is part of the cell’s text rather than use it as a wildcard. If a replacement unexpectedly matches too much or nothing at all, check whether the search text contains wildcard characters and whether they need to be escaped.

How to preview and verify a change

For a small, predictable edit, Replace All may be the quickest choice. For a broad or ambiguous term, use Find All first. The results list can help you see which cells match and which worksheets contain them. You can select a result to inspect its cell before deciding whether a global replacement is appropriate.

After replacing, check more than the replacement count. A count confirms that Excel made changes; it does not confirm that every change was intended. Review representative cells on each affected sheet, inspect formulas if they were included, and check totals, lookup results, charts, or reports that depend on the edited content. If the workbook contains hidden sheets or complicated formulas, inspect those areas separately rather than treating one successful Replace All as proof that every dependent part is correct.

Excel normally lets you undo a recent Replace All with Ctrl+Z, provided the action remains in the undo history. Do not rely on undo as your only safeguard: later actions can complicate recovery, and closing the workbook removes the opportunity to undo that session’s changes. A saved copy is a more reliable fallback for an important workbook.

Common problems and their causes

  • Only one sheet changed: The Within option was set to Sheet. Reopen the dialog and choose Workbook.
  • Some matches were missed: Check the Look in setting, match-case and entire-cell options, and whether a cell range was selected before opening Find and Replace.
  • Too many cells changed: The search was a substring match or included a wildcard. Undo if possible, restore the backup if needed, and repeat with a more specific search or Match entire cell contents.
  • A protected worksheet did not update: Protection can prevent edits to locked cells. Follow the workbook owner’s process for unprotecting or changing those cells; do not assume that a workbook-wide setting overrides sheet protection.
  • The displayed result did not change: The cell may show a calculated value, while the text you need to change is in a formula or in a different source cell. Check the formula bar and trace the source of the displayed content.

Also remember that replacement is literal text editing, not a semantic correction tool. Replacing a short abbreviation can unintentionally alter a longer word containing the same letters. If matches have different meanings, review each one rather than applying a single global replacement.

Excel for Mac and Excel for the web

In Excel for Mac, the replacement dialog is also available from Home > Find & Select > Replace. The keyboard shortcut differs from Windows: use Control+H in Excel for Mac. Menu and dialog details can vary slightly by Excel release, so check the expanded search options for the workbook scope before replacing.

Excel for the web also provides Find and Replace, but its interface and available options can differ from the Windows desktop app. If you need precise control over search scope, formulas, or other advanced options and cannot see the setting you need in the browser, open the workbook in the desktop app and confirm the scope there. In either version, check the actual dialog options rather than assuming that a previous search’s settings carried over as expected.

Frequently Asked Questions

How do I replace a word in every sheet in Excel?
Press Ctrl+H, expand Options, set Within to Workbook, enter the old and new text, and choose Replace All.

Does Replace All change every open Excel file?
No. The workbook scope applies to the active workbook, not all workbooks that are open in Excel. Repeat the operation in each workbook you intend to change.

Can I replace only a complete cell entry?
Yes. In the expanded options, select Match entire cell contents. This avoids replacing the search text when it appears only as part of a longer entry.

Can Find and Replace change formulas?
Yes, if the search is set to look in formulas and the text occurs in a formula. That can change the formula itself, so inspect matches and verify results before relying on the workbook.

Can I undo Replace All?
Usually, press Ctrl+Z soon after the replacement while it is still in the undo history. For important work, save a separate copy before replacing rather than depending on undo.

Why did Excel replace too many results?
The search may have matched text inside longer cell entries, used a wildcard, or ignored case. Review the options, use a more specific search, or select Match entire cell contents when appropriate.

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.