Open Find and Replace and search for what you need to change
The Find and Replace tool in Excel lets you search for text or numbers across your entire spreadsheet and swap them out in seconds. You reach it by pressing Ctrl+H on Windows or Cmd+Option+F on Mac. A dialog box opens with two fields: "Find what" and "Replace with."
Type the text or number you want to find in the first field. If you are looking for an exact match—say, the word "Pending" and nothing else—leave the default settings as they are. Excel will find every instance of that word, whether it stands alone or appears inside a longer word like "Pending Review."
In the "Replace with" field, type what you want to put in its place. If you want to delete something entirely, leave this field blank and click Replace. Excel will remove every match.
Key Takeaways
- Press Ctrl+H (Windows) or Cmd+Option+F (Mac) to open Find and Replace, then type what to find and what to replace it with.
- Click "Replace All" to change every match at once, or "Replace" to change one at a time and skip matches you want to keep.
- Use "Match entire cell contents" if you want to find only cells that contain exactly what you typed, nothing more.
- Enable "Match case" if capitalization matters—for example, to find "john" but not "John".
- Always review what will change before you click "Replace All," because the action cannot be undone with a single step.
Replace one match at a time or all at once
After you type what to find and what to replace it with, you have two choices. Click "Replace" to change only the first match Excel finds. The tool then moves to the next match so you can decide whether to replace that one too. This is useful when you want to keep some instances of the text and change others.
Click "Replace All" to change every match in the spreadsheet at once. Excel tells you how many replacements it made. This is faster when you are certain every match should change—for example, if you are fixing a misspelled product name that appears in 200 rows.
If you realize you made a mistake after clicking "Replace All," you can undo it when ready by pressing Ctrl+Z (Windows) or Cmd+Z (Mac). Once you perform another action, the undo becomes unavailable.
Use "Match entire cell contents" to avoid partial matches
By default, Excel finds your search term anywhere it appears in a cell. If you search for "cat," it will find "cat," "catalog," "concatenate," and "scatter." To find only cells that contain exactly "cat" and nothing else, check the box labeled "Match entire cell contents" before you search.
This setting is essential when you are working with codes or short values. For instance, if you want to replace the status code "A" with "Active," you do not want to accidentally change the "A" inside "Approved" or "Archived." Turning on "Match entire cell contents" prevents that.
Turn on "Match case" when capitalization matters
Excel's default search ignores capitalization. If you search for "john," it finds "john," "John," and "JOHN." When capitalization matters—such as when you are standardizing names or fixing product codes—check the "Match case" box.
With "Match case" on, searching for "john" finds only lowercase "john" and leaves "John" and "JOHN" untouched. This is useful in databases where uppercase and lowercase letters mean different things, or when you are correcting only specific versions of a word.
Search only in a specific column or range
By default, Find and Replace searches your entire spreadsheet. If you want to limit the search to one column or a small section, select that range first before you open the Find and Replace dialog. Highlight the cells you want to search, then press Ctrl+H. Excel will search only within your selection.
This protects you from accidentally changing data in the wrong part of your spreadsheet. For example, if you have a column of customer names and a column of notes, and both contain the word "Smith," you can select only the names column and replace "Smith" there without touching the notes.
Use wildcards to find patterns instead of exact text
Excel's Find and Replace tool supports wildcards—symbols that stand in for unknown characters. The question mark ? represents any single character, and the asterisk * represents any number of characters. To use wildcards, check the "Use wildcards" box in the Find and Replace dialog.
For example, if you search for "cat?" you will find "cats," "cate," and "cath," but not "cat" alone. If you search for "cat*" you will find "cat," "cats," "catalog," and "catastrophe." This is useful when you know part of what you are looking for but not the whole thing.
A common use is finding phone numbers with a specific pattern. If your data contains phone numbers formatted as "555-1234" and you want to find all numbers starting with "555," search for "555*" to locate them all at once.
Preview changes before you commit to them
Before you click "Replace All," take a moment to click "Find All" instead. This shows you every match Excel found in a list at the bottom of the dialog. You can scroll through the list and see exactly which cells will change. If the list includes cells you did not expect, close the dialog and adjust your search terms.
This step takes 10 seconds and prevents mistakes that could affect hundreds of rows. Once you are confident the list is correct, close the preview, then click "Replace All."
Frequently Asked Questions
Can I undo a Replace All if I made a mistake?
Yes, but only when ready. Press Ctrl+Z (Windows) or Cmd+Z (Mac) right after you click "Replace All" to undo the entire operation. If you perform any other action first—typing, clicking, saving—the undo becomes unavailable. This is why previewing with "Find All" before you replace is important.
How do I find and replace across multiple sheets at once?
Open Find and Replace, then look for the dropdown that says "Sheet" or "Workbook." Select "Workbook" to search all sheets in your file at once. The tool will find and replace matches on every sheet. Be extra careful with this option because changes happen everywhere.
What if I want to find something that contains a special character like a question mark or asterisk?
If you are searching for a literal question mark or asterisk and you have wildcards turned on, you need to escape the character by putting a tilde (~) before it. Search for ~? to find a question mark, or ~* to find an asterisk. If wildcards are off, you can search for these characters normally.
Can I search for line breaks or empty cells?
Yes. To find empty cells, leave the "Find what" field blank and click "Find All." To find line breaks within cells, type ^n in the "Find what" field. This works on Windows; on Mac, use Ctrl+J instead. These are advanced searches, so make sure you understand what you are looking for before you replace.
Does Find and Replace work on formulas or just the values they display?
Find and Replace searches both formulas and the values they show. If you have a formula like =SUM(A1:A10) and you search for "SUM," it will find and replace that text inside the formula. Be careful not to break formulas by accident. If you only want to search the displayed values, not the formulas, there is no built-in option—you would need to copy and paste values first.