Open Find and Replace with Ctrl+H
The fastest way to find and replace in Excel is to press Ctrl+H on your keyboard. This opens the Find and Replace dialog box, which is where all the work happens. On a Mac, use Cmd+H instead.
You can also reach this dialog through the menu: click the Home tab, then in the Editing group on the right side, click Find & Select, and choose Replace. But the keyboard shortcut is faster once you use it a few times.
The dialog box has two main fields: Find What and Replace With. Type what you want to find in the first field and what you want it to become in the second field.
Key Takeaways
- Press Ctrl+H to open Find and Replace; type the text you want to find and what to replace it with, then click Replace All to change every instance at once.
- Use Replace instead of Replace All if you want to check each change before it happens, which takes longer but prevents mistakes.
- Check the Match Case box if you need to distinguish between uppercase and lowercase letters, and check Match Entire Cell Contents if you want to match only whole cells, not partial text.
- The Find and Replace tool works across all sheets in your workbook unless you first select a specific range or sheet.
- If you make a mistake, press Ctrl+Z when ready to undo all the replacements at once.
Replace All vs. Replace One at a Time
Once you have typed what you want to find and what you want to replace it with, you have two choices: Replace All or Replace. Replace All changes every instance of that text in one click. Replace goes through one instance at a time and asks you to confirm each change before it happens.
Use Replace All when you are confident the change is correct — for example, replacing a company name that appears the same way everywhere. Use Replace when you are less sure — for example, if you are replacing a short word like "to" that might appear in different contexts where you do not want it changed.
After you click Replace All, Excel tells you how many replacements it made. If the number surprises you, press Ctrl+Z when ready to undo the entire operation.
Match Case and Match Entire Cell Contents
Below the Find What and Replace With fields are two checkboxes that change how the search works. Match Case means Excel will only find text that matches the uppercase and lowercase letters you typed. If you search for "Smith" with Match Case checked, it will not find "smith" or "SMITH".
Leave Match Case unchecked if you want to find all versions regardless of capitalization. Check it only when the difference matters — for example, if you have both "march" (the month) and "March" (the verb) in your spreadsheet and you want to replace only one.
Match Entire Cell Contents means Excel will only find cells that contain exactly what you typed, nothing more. If you search for "10" without this box checked, it will find "10", "100", "210", and "10.5". If you check the box, it will find only cells that say exactly "10".
Search Within Sheets and Ranges
By default, Find and Replace searches your entire workbook — every sheet and every cell. If you want to limit the search to one sheet or one range of cells, select that area first before you open the Find and Replace dialog.
To search only one sheet, click the sheet tab at the bottom to make sure you are on that sheet, then open Find and Replace. To search only a range of cells, click and drag to select those cells, then open Find and Replace. The dialog will show "Search" set to "Sheet" or "Range" depending on what you selected.
If you change your mind and want to search the whole workbook again, open Find and Replace, click Options to expand the menu, and change the Search setting back to "Workbook".
Using Wildcards for Partial Matches
If you need to find text that follows a pattern but is not exactly the same each time, you can use wildcards. A wildcard is a symbol that stands in for any character or group of characters. The question mark ? stands for any single character. The asterisk * stands for any number of characters.
For example, if you want to find all three-letter words that start with "c", you would search for "c??" (c followed by two question marks). If you want to find anything that ends with ".com", you would search for "*.com". To use wildcards, you must first check the Match Entire Cell Contents box.
If you actually want to search for a question mark or asterisk as a regular character, type a tilde ~ before it: ~? or ~*.
Find and Replace with Formulas
Find and Replace works on the text you see in cells, but it can also find and replace parts of formulas. If you have a formula like =SUM(A1:A10) and you want to change it to =SUM(B1:B10), you can search for "A1:A10" and replace it with "B1:B10".
Be careful when replacing inside formulas, because a small mistake can break many calculations at once. Use Replace (one at a time) rather than Replace All when you are working with formulas, so you can check each change before it happens.
If you want to see the formulas themselves instead of their results, press Ctrl+` (the backtick key, usually in the top left of your keyboard). This toggles formula view on and off. When formulas are visible, Find and Replace will search the actual formula text.
Undo a Find and Replace That Went Wrong
If you click Replace All and realize when ready that you made a mistake, press Ctrl+Z to undo the entire operation. This works even if hundreds of cells were changed. Excel treats the whole Replace All as a single action, so one undo reverses all of it.
If you did not realize the mistake right away and have done other work since the replacement, you may not be able to undo it. This is why using Replace (one at a time) is safer when you are not completely sure about the change. It takes longer, but it prevents costly mistakes.
Frequently Asked Questions
Can I search for a line break or special character?
Yes, but you need to use a special code. To find a line break within a cell, search for Ctrl+J (or Cmd+J on Mac) — hold Ctrl and press J, and the line break will appear in the Find What field. To find a tab character, use Ctrl+Tab. For other special characters, you may need to use regular expressions if your version of Excel supports them.
Does Find and Replace work on hidden rows or columns?
Yes. Find and Replace searches all cells in the range you specified, whether they are hidden or visible. If you want to exclude hidden rows or columns, you must unhide them first or select only the visible cells before opening Find and Replace.
Can I find and replace across multiple workbooks at once?
No. Find and Replace works on one workbook at a time. If you need to make the same change in multiple files, you must open each workbook and run Find and Replace in each one separately.
What if the text I want to find appears in a cell comment?
Find and Replace does not search cell comments by default. It searches only the text and formulas in cells themselves. To search comments, you would need to use a different method or manually review comments.