Open Find and Replace with Ctrl+H
The fastest way to find and replace text or numbers 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 by clicking the Home tab, then clicking Find & Select in the top right, then choosing Replace. But the keyboard shortcut is quicker 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 to replace it with in the second field.
Key Takeaways
- Press Ctrl+H to open Find and Replace, type your search term and replacement term, then click Replace All to change every instance at once.
- Use Match Case if you need to distinguish between uppercase and lowercase letters, or Entire Cell Contents if you want to match only cells that contain exactly that text and nothing else.
- Click Replace instead of Replace All if you want to review each match one at a time before replacing it.
- Find and Replace works across the entire sheet by default, but you can select a range of cells first to limit the search to just that area.
- If you make a mistake, press Ctrl+Z when ready to undo all the replacements.
Replace All at Once or One at a Time
After you type your search term and replacement term, you have two choices: Replace All or Replace. Replace All changes every match in the sheet when ready. Replace shows you each match one at a time, and you decide whether to replace it or skip it and move to the next one.
Use Replace All when you are confident the search term appears only where you want it replaced. Use Replace when the term might appear in places you do not want to change. For example, if you search for "John" and replace with "Jonathan", Replace All might change a cell that says "John Smith" and another that says "John's Supplies" — which may or may not be what you want.
When you click Replace, Excel highlights the first match and waits for you to choose. Click Replace to change that one, or click Find Next to skip it and move to the next match. At the end, Excel tells you how many replacements were made.
Limit Your Search with Match Case and Entire Cell Contents
The Find and Replace dialog has checkboxes for options that narrow your search. Match Case makes the search case-sensitive, so searching for "john" will not find "John" or "JOHN". This is useful when you need to replace only lowercase or uppercase versions of a word.
Entire Cell Contents means Excel will match only cells that contain exactly what you typed and nothing else. Without this option, searching for "John" will find "John Smith", "John's", and "Johnathan". With it checked, only cells that say exactly "John" will match.
Other options like Format and Options may appear depending on your Excel version. Format lets you search for cells with specific colors or fonts. Options expands to show choices like Search Within (Sheet or Workbook) and Search Order (by rows or columns).
Search Only Part of Your Sheet
By default, Find and Replace searches the entire sheet. If you want to search only a specific range of cells, select that range before you open the Find and Replace dialog. Then when you open Find and Replace, it will search only the cells you selected.
To select a range, click the first cell you want to include, then hold Shift and click the last cell. Or click and drag from the first cell to the last. The selected cells will be highlighted in blue. Then press Ctrl+H to open Find and Replace.
If you forget to select a range and open Find and Replace anyway, you can still close the dialog, select your range, and open Find and Replace again. Excel remembers what you typed in the Find What and Replace With fields.
Undo Replacements If You Make a Mistake
If you click Replace All and realize you made a mistake, press Ctrl+Z when ready. This undo command reverses all the replacements at once, restoring your sheet to how it was before you opened Find and Replace.
Undo works only if you do it right away. If you close the file or make other changes first, you may not be able to undo the replacements. For this reason, it is safer to use Replace instead of Replace All when you are not completely sure about your search term.
Use Wildcards for Flexible Searching
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 asterisk (*) stands for any number of characters, and the question mark (?) stands for exactly one character.
For example, if you search for "John*" you will find "John", "Johnson", "Johnathan", and any other cell that starts with "John". If you search for "John?" you will find only "Johns" (John plus one character). To use wildcards, you must check the Options box and enable Regular Expressions or wildcards, depending on your Excel version.
Wildcards are powerful but take practice. Start with straightforward searches and move to wildcards only when you need them.
Find Without Replacing
If you only want to find text without replacing it, press Ctrl+F instead of Ctrl+H. This opens the Find toolbar, which is simpler than the full Find and Replace dialog. Type what you are looking for and press Enter or click Find All to see every match.
Find All shows a list of every cell that contains your search term. Click any cell in the list to jump to that location in your sheet. This is useful when you want to review all instances of something without changing them.
Frequently Asked Questions
Can I replace text in multiple sheets at once?
Yes. In the Find and Replace dialog, look for the Search Within option and change it from Sheet to Workbook. This searches and replaces across all sheets in your file. Be careful with this option because it is straightforward to change something you did not intend to change in a sheet you forgot about.
What if I want to replace with nothing (delete the text)?
Leave the Replace With field empty and click Replace All. Excel will delete every instance of the search term. This is useful for removing unwanted characters or prefixes from many cells at once.
Can I search for line breaks or special characters?
Yes, but the method depends on your Excel version. In newer versions, you can enable Regular Expressions in the Options section and use codes like \n for line breaks. In older versions, you may need to use Ctrl+J to insert an actual line break into the Find What field. Check your version's help menu for the exact codes.
Why does Find and Replace say "no cells were found"?
The search term does not exist in your sheet, or it exists in a way you did not expect. Check for extra spaces before or after your search term, or try searching without Match Case checked. Also make sure you are searching the right sheet — if you selected a range before opening Find and Replace, it only searches that range.
Can I replace with a formula instead of text?
No. Find and Replace works only with text and numbers, not formulas. If you need to replace cell contents with a formula, you will need to enter the formula manually or use a different method like Find and then paste special.