The Find and Replace feature lets you search for text or numbers across your entire spreadsheet and swap them out in seconds
Excel's Find and Replace tool saves you from manually hunting through thousands of cells. You can search for a single word, a formula, or even part of a cell's contents, then replace it with something new — all at once or one at a time. The feature works the same way in Excel on Windows, Mac, and the web version.
You open Find and Replace by pressing Ctrl+H on Windows or Command+H on Mac. A dialog box appears with two main fields: one for what you're looking for and one for what you want to replace it with. You can search your current sheet or your entire workbook, match whole cells only, or search within formulas.
Key Takeaways
- Open Find and Replace with Ctrl+H (Windows) or Command+H (Mac), then type the text you want to find and what to replace it with.
- Use "Replace All" to change every match at once, or "Replace" to go through matches one by one and choose which ones to change.
- The "Match entire cell contents" option prevents accidental replacements — for example, it stops you from changing "cat" inside "catalog".
- You can search formulas, values, or comments separately, and limit your search to a specific sheet or your entire workbook.
Opening Find and Replace and entering your search terms
Press Ctrl+H on Windows or Command+H on Mac. The Find and Replace dialog opens. In the "Find what" field, type the text or number you want to search for. In the "Replace with" field, type what you want it to become.
If you're replacing a number like "2024" with "2025", just type those numbers. If you're replacing text like "John" with "Jonathan", type those names. You can also leave the "Replace with" field empty if you want to delete something — for example, finding "Inc." and replacing it with nothing removes that abbreviation from every cell.
Before you click Replace, check the "Options" section at the bottom of the dialog. This is where you control how strict your search is.
Choosing between Replace All and Replace one by one
"Replace All" changes every match in your search area when ready. Use this when you're confident the replacement is correct everywhere — for example, if your company changed its name from "Acme Corp" to "Acme Industries" and you want that change everywhere in the spreadsheet.
"Replace" goes through matches one at a time. Excel highlights each match and waits for you to click "Replace" to change that one, or "Find Next" to skip it. Use this method when some matches should change and others shouldn't — for example, if you're replacing "March" with "March 15" but only in certain rows.
After you click Replace All or finish clicking Replace on individual matches, Excel tells you how many replacements it made. If the number surprises you, press Ctrl+Z to undo and try again with stricter search options.
Using Match entire cell contents to avoid accidents
By default, Find and Replace searches for your text anywhere inside a cell. If you search for "cat" and replace it with "dog", it changes "cat" to "dog" but also changes "catalog" to "dogalog" and "scatter" to "sdogter". That's usually not what you want.
Check the box labeled "Match entire cell contents" to search only for cells that contain exactly what you typed, nothing more. Now searching for "cat" only finds cells with exactly "cat" in them, leaving "catalog" and "scatter" untouched.
This option is especially useful when you're working with lists of codes, names, or product numbers where a partial match could cause problems.
Searching within formulas versus values
Excel stores two things in each cell: the value you see on screen and sometimes a formula that calculates that value. By default, Find and Replace searches the values — what you actually see. If you need to find and change something inside a formula, check the box labeled "Search in formulas".
For example, if you have a formula like =SUM(A1:A10) and you want to change it to =SUM(B1:B10), you would search for "A1:A10" with "Search in formulas" checked. Without that option checked, Excel wouldn't find it because the formula itself isn't visible on screen.
Most of the time you'll leave this unchecked. Use it only when you're deliberately changing the structure of your formulas.
Limiting your search to one sheet or searching the whole workbook
When you open Find and Replace, it searches only the sheet you're currently viewing. If your workbook has multiple sheets and you want to search all of them at once, click the dropdown that says "Sheet" and select "Workbook".
Searching the whole workbook is useful when you're making a company-wide change — like updating a phone number or address that appears on multiple sheets. Be extra careful with "Replace All" when searching the workbook, because the changes happen everywhere at once and you won't see them happening.
If you only want to change something on one specific sheet, make sure the dropdown still says "Sheet" before you click Replace All.
Undoing replacements if something goes wrong
If you click Replace All and realize the replacement wasn't what you wanted, press Ctrl+Z when ready to undo. Excel reverses all the replacements at once, putting everything back the way it was. You can undo multiple times if you need to go back several steps.
This is why using "Replace" one at a time is safer when you're not completely sure about a change. You can see each replacement before it happens and skip the ones that don't look right.
If you've already saved your file after making replacements, undo won't work. This is another reason to use "Replace" instead of "Replace All" when you're uncertain.
Frequently Asked Questions
Can I search for line breaks or special characters?
Yes. In the "Find what" field, you can use special codes: type ^n to find a line break within a cell, or ^t to find a tab character. For other special characters like asterisks or question marks, put a tilde (~) before them — for example, ~* finds an actual asterisk instead of using it as a wildcard.
What does "Match case" do?
When you check "Match case", the search becomes case-sensitive. Searching for "John" with "Match case" checked finds "John" but not "john" or "JOHN". Leave it unchecked if you want to find all variations of capitalization.
Can I use wildcards in my search?
Yes. The asterisk * matches any number of characters, and the question mark ? matches exactly one character. For example, searching for "cat*" finds "cat", "catalog", and "category". To search for an actual asterisk or question mark, put a tilde before it: ~* or ~?.
What if I only want to replace in certain cells?
Select those cells before opening Find and Replace. The search will only look within your selection. If you don't select anything, it searches the entire sheet or workbook depending on your settings.
Does Find and Replace work on hidden rows or columns?
Yes. Find and Replace searches hidden cells too. If you don't want replacements to happen in hidden rows, unhide them first, select only the visible cells you want to change, then open Find and Replace.