Find and Replace in Excel — quick steps and options

Find and Replace in Excel — quick steps and options

Open the Find dialog with Ctrl+F (Windows) or Command+F (Mac) and open Replace directly with Ctrl+H (Windows) or the Replace command in Excel for Mac. Type what you want to find, type the replacement, use Options to set scope (Sheet or Workbook), choose whether to match case or search in Formulas, and then Replace or Replace All. Preview results and press Undo immediately if something changed unexpectedly.

Quick start: the step-by-step Replace process

Follow these steps for a safe, repeatable find-and-replace action that works in most versions of Excel on Windows and Mac.

  1. Open Replace: Press Ctrl+H (Windows). On Mac use Command+F and choose Replace from the dialog or the Edit menu if your version does not expose a direct shortcut.
  2. Enter Find what and Replace with values: Type the exact text or number you want to change and the new text or number.
  3. Click Options: Expand Options to choose the scope, match options, and whether to search in values, formulas, or comments.
  4. Set scope: Choose Within: Sheet or Workbook depending on whether you need to change one sheet or every sheet in the workbook.
  5. Preview: Use Find Next to review occurrences, then use Replace to change single items or Replace All for a bulk change.
  6. Undo if needed: If the result is not what you expect, press Ctrl+Z (Windows) or Command+Z (Mac) immediately to revert changes.

Options explained: what each setting does

Knowing what each option means stops many accidental edits. The Options button (or More) reveals the useful controls.

Within: Sheet vs Workbook

Sheet limits the search to the active sheet. Workbook searches every sheet in the file. Workbook searches are convenient but risk unintended replacements on hidden or protected sheets; inspect results before committing Replace All.

Search: By Rows or By Columns

Most of the time Searching By Rows is correct. Use By Columns when your data is organized column-first and you want to move vertically through cells.

Match case and Match entire cell contents

Match case forces exact capitalization. Match entire cell contents only matches cells whose full content equals the search term. Together they reduce false positives when replacing similar text.

Look in: Formulas, Values, or Comments

Look in controls whether Excel searches formula text, the computed cell values, or comments/notes. To change text inside formulas (for example changing a sheet name inside references or literal text embedded in a concatenation) set Look in to Formulas.

Use wildcards and pattern matching

Excel supports simple wildcard characters. This is useful when the exact text varies.

For examples and more on pattern use, see Using wildcards and pattern matching in Excel. Remember that wildcard Replace operations can change many values quickly; prefer Find Next to verify the first few matches.

Search within formulas: a worked example

Here is a common case: you have formulas that include a literal text such as "OldName" embedded with concatenation or within functions, and you need to update it to "NewName" across the workbook.

  1. Open Replace and set Look in to Formulas and Within to Workbook if formulas are on multiple sheets.
  2. In Find what enter OldName and in Replace with enter NewName.
  3. Click Find Next to locate the first instance, then inspect the formula bar to confirm the match is the intended one.
  4. Use Replace for each instance or Replace All once you have checked several examples.
  5. Undo with Ctrl+Z if you find unintended replacements, then refine the search with Match case or Match entire cell contents if necessary.

This approach changes the literal text inside formulas without recalculating formula structure. If you need to change function names or references, test on a copy of the workbook first.

Replace formatting as well as text

Excel can find cells by formatting and replace formats or content. Use this when you want to standardize styles or remove conditional formatting results.

  1. Open Replace and click Options, then click Format next to Find what.
  2. Choose the formatting to search for (font, fill color, number format, etc.) and click OK.
  3. Optionally click Format next to Replace with to choose the new formatting to apply.
  4. Use Find Next to preview and Replace or Replace All to apply broadly.

Be aware Replace All will change every matching cell, including hidden cells. To avoid mistakes, use a small test range first or copy the sheet before proceeding.

Checklist before you hit Replace All

Common mistakes and how to avoid them

Useful links and next steps

If you use keyboard shortcuts often, review Essential Excel keyboard shortcuts for commands that speed this work. For larger cleanup tasks consider the techniques in Data cleaning techniques in Excel. If you will run broad replace operations on shared workbooks, review how to restrict edits with How to protect and unlock Excel sheets safely so you do not change protected areas accidentally.

Closing

Find and Replace in Excel is fast and powerful when you use the Options controls, preview results, and keep a short checklist to avoid mistakes. Test on a copy when in doubt, and use Undo immediately if a Replace All produces unexpected changes.