Excel's Find and Replace tool lets you change one piece of data to another across your entire spreadsheet in seconds
The Find and Replace feature in Excel searches for text, numbers, or formulas and swaps them out for something else. You can replace a single cell or thousands of cells at once. It works the same way in Excel for Windows, Excel for Mac, and Excel online — the keyboard shortcut is Ctrl+H on Windows or Command+H on Mac.
This is faster and safer than clicking through each cell by hand, because you can see what will change before you confirm it. You can also limit the replacement to a specific column, sheet, or selection so you don't accidentally change data you meant to keep.
Key Takeaways
- Open Find and Replace with Ctrl+H (Windows) or Command+H (Mac), type what you want to find and what to replace it with, then click Replace All or Replace to check each change first.
- Use Match entire cell contents if you want to replace only cells that contain exactly that text, not cells where the text appears as part of something longer.
- Select a range of cells before opening Find and Replace to limit changes to only that area instead of the whole sheet.
- Click the arrow next to Options to access settings like Match case (uppercase vs. lowercase) and Search by rows or columns.
- If you replace something by mistake, press Ctrl+Z when ready to undo the change.
Opening Find and Replace and entering your search terms
Press Ctrl+H on a Windows keyboard or Command+H on a Mac. The Find and Replace dialog box will open. In the Find field, type the text or number you want to search for. In the Replace field, type what you want it to become.
If you are replacing a number, type it as it appears in the cell — for example, if a cell shows "2024" but you want to change it to "2025", type those exact numbers. If you are replacing text like a name or product code, type it exactly as it appears, including any spaces or punctuation.
Choosing Replace or Replace All
After you enter your search and replacement text, you have two choices. Replace All changes every match in the sheet at once. Replace changes one match at a time and shows you each one before it happens.
Use Replace All only when you are certain the change is correct — for example, replacing "2024" with "2025" across an entire budget sheet. Use Replace one at a time if you are less sure, or if the text you are searching for might appear in places you do not want to change. Excel will tell you how many replacements it made when it finishes.
Limiting the search to part of your spreadsheet
If you want to change data in only one column or a specific range of cells, select that area before you open Find and Replace. Click on the column header to select an entire column, or click and drag to select a range. Then press Ctrl+H. The replacement will only affect the cells you selected.
This is useful when you have the same text in different parts of your spreadsheet and you only want to change it in one place. For example, if the word "Draft" appears in both a status column and a notes column, you can select just the status column and replace only those instances.
Using Match entire cell contents to avoid partial matches
By default, Find and Replace will change text even if it is part of a longer word or phrase. If you search for "cat" it will change "cat", "catalog", and "category" all the same way. To change only cells that contain exactly "cat" and nothing else, click Options to expand the menu, then check the box next to Match entire cell contents.
This setting is important when you are working with product codes, IDs, or short words that might appear inside longer words. Turning it on prevents accidental changes to data you meant to keep.
Matching case and other advanced options
Click the arrow or button labeled Options to see additional settings. Match case treats uppercase and lowercase letters as different — so searching for "John" will not find "john". Search by rows or Search by columns controls the order Excel checks cells, which matters if you are using Replace one at a time and want to move through the sheet in a specific direction.
Most of the time you can leave these settings alone. Use Match case only if the difference between uppercase and lowercase matters to your data — for example, if you have a column of chemical formulas where H2O and h2o mean different things.
Undoing a replacement if something goes wrong
If you click Replace All and realize the change was wrong, press Ctrl+Z when ready to undo it. Excel will reverse the entire replacement operation and restore your original data. This works even if you have already closed the Find and Replace dialog.
If you have made other changes since the replacement, undo will reverse those too, so work carefully. If you are not sure whether a replacement is correct, always use Replace one at a time instead of Replace All, so you can stop if something looks wrong.
Frequently Asked Questions
Can I search for a formula instead of text?
Yes. In the Find field, type the formula exactly as it appears in the cell, including the equals sign. For example, to find =SUM(A1:A10) and replace it with =SUM(B1:B10), type both formulas in their respective fields. This is useful when you need to update a formula that is used in many cells.
What if I only want to replace data in one sheet, not the whole workbook?
Make sure you are on the sheet you want to change before you open Find and Replace. The tool will search only the active sheet unless you have selected a range that spans multiple sheets, which is rare. If you have multiple sheets, repeat the process on each one separately.
Can I use wildcards or partial matches in Find and Replace?
Yes, if you click Options and check Use regular expressions, you can use wildcards like * (any characters) and ? (single character). For example, searching for "cat*" will find "cat", "catalog", and "category". This is an advanced feature and is usually not needed for basic replacements.
Will Find and Replace work on hidden cells or filtered data?
Yes. Find and Replace searches all cells in the range, including hidden ones and cells hidden by a filter. If you do not want to change hidden data, unhide it first or select only the visible cells before opening Find and Replace.