Open Find and Replace with Ctrl+H
The fastest way to open Find and Replace in Excel is to press Ctrl+H on your keyboard. On a Mac, use Cmd+H instead. A dialog box will appear with two main fields: "Find what" and "Replace with".
You can also reach this tool through the menu. Click the Home tab, then look for the Find & Select button in the top right corner of the ribbon. A dropdown menu will appear — select Replace from the list.
Key Takeaways
- Press Ctrl+H to open Find and Replace, type what you want to find in the first field and what you want to replace it with in the second field, then click Replace All to change everything at once.
- Use Match entire cell contents if you want to replace only cells that contain exactly what you typed, not cells where that text appears alongside other words.
- The Match case option lets you distinguish between uppercase and lowercase letters, so "Sales" and "sales" will be treated as different.
- You can undo a Replace All action immediately after by pressing Ctrl+Z, but waiting longer makes this harder to do.
- Replace one cell at a time by clicking Find Next, reviewing what it found, then clicking Replace only if that instance is correct.
Type what you want to find and what to replace it with
In the "Find what" field, type the text or number you want to search for. This can be a single word, a phrase, or even a partial match — for example, typing "John" will find "John", "Johnson", and "Johnny" all in the same search.
In the "Replace with" field, type what you want those matches to become. If you leave this field blank and click Replace All, Excel will delete the text you found instead of replacing it with something else. This is useful if you want to remove a word or character from many cells at once.
Choose Replace All or Replace one at a time
Replace All changes every match in your spreadsheet instantly. This is fast but risky if you have not reviewed what will change. Use it only when you are certain the search term appears only where you want it replaced.
The safer approach is to click Find Next first. Excel will highlight the first cell that matches what you typed. Look at it and decide whether this is something you actually want to replace. If yes, click Replace to change only that one cell. Click Find Next again to move to the next match and repeat the process.
Use Match entire cell contents to avoid partial matches
By default, Find and Replace will match text anywhere inside a cell. If you search for "cat", it will find "cat", "category", "concatenate", and "scatter" — anything containing those letters in that order.
Check the Match entire cell contents checkbox if you want to match only cells that contain exactly what you typed and nothing else. Now searching for "cat" will find only cells with exactly "cat" in them, not "category" or "scatter".
Use Match case to distinguish between uppercase and lowercase
Excel treats uppercase and lowercase letters as the same by default. A search for "sales" will find "Sales", "SALES", and "sales" all together.
Check the Match case checkbox if you need to distinguish between them. Now "Sales" and "sales" will be treated as different, and searching for one will not find the other. This is useful when you are working with codes or names where capitalization matters.
Undo a Replace All action if you made a mistake
If you click Replace All and immediately realize you made a mistake, press Ctrl+Z right away. This will undo the entire replacement and restore your spreadsheet to how it was before.
The longer you wait after clicking Replace All, the harder it becomes to undo — other actions you take will stack on top of it. If you have made several changes since the replacement, you may have to undo multiple steps to get back to the original state. This is another reason to use Replace one cell at a time when you are unsure.
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 specific range of cells, select that area before opening Find and Replace. Highlight the cells you want to search, then press Ctrl+H. Excel will now search only within your selection.
This is useful when you have the same text in different parts of your spreadsheet and you want to replace it in only one section. For example, if you have customer names in column A and product names in column B, and both contain "Smith", you can select just column A and replace "Smith" only there.
Frequently Asked Questions
Can I search for a line break or special character?
Yes, but you need to use a special code. Click the Options button to expand more settings, then check Regular expressions. In the Find field, type ^n to search for line breaks within cells. For other special characters, the codes vary — consult Excel's documentation for the full list.
What if I want to replace text only in certain columns?
Select the columns you want to search before opening Find and Replace. Click the column header to select an entire column, or hold Ctrl and click multiple column headers to select several at once. Then press Ctrl+H and proceed normally — the search will stay within your selection.
Can I undo Replace All if I waited too long to press Ctrl+Z?
If you cannot undo because too much time has passed or you made other changes, close the file without saving and reopen it. Your spreadsheet will return to the last saved version. This only works if you have not saved the file since the replacement happened.
Does Find and Replace work on formulas or only on displayed values?
By default, it searches the displayed values. If you need to search inside formulas themselves, click Options to expand more settings, then check Search in formulas. This will find matches within the formula code, not just the result the formula displays.