The Find and Replace tool finds text or numbers in your spreadsheet and swaps them for something else in one step

Excel's Find and Replace feature searches through your entire spreadsheet — or just the cells you select — and changes every match at once. You open it with Ctrl+H on Windows or Cmd+Option+F on Mac. Type what you want to find in the first box, type what you want instead in the second box, then choose whether to replace one cell at a time or all of them together. This saves hours when you need to fix a mistake across hundreds of rows, rename a product code everywhere it appears, or swap out outdated information.

The tool works on exact matches by default — if you search for "Smith" it will not catch "Smithson" unless you tell it to. You can also search for patterns using something called regular expressions, which lets you find things like "any cell that starts with a number" or "any date in March". Most people never need that feature, but it exists if your find-and-replace job is more complex than a straightforward word swap.

Key Takeaways

  • Open Find and Replace with Ctrl+H (Windows) or Cmd+Option+F (Mac), type what to find and what to replace it with, then click Replace All to change every match at once.
  • By default, Find and Replace matches whole words only — searching for "cat" will not change "catalog" — but you can turn off that setting if you need partial matches.
  • You can limit the search to a specific range of cells by selecting them first, which prevents accidental changes in parts of the spreadsheet you want to leave alone.
  • The Replace All button changes every match without asking you first, so use Replace (one at a time) if you are unsure whether every match should change.
  • You can undo any replace operation with Ctrl+Z if the results are not what you expected.

Opening Find and Replace and entering your search terms

Press Ctrl+H on Windows or Cmd+Option+F on Mac. A dialog box appears with two text fields. The top field is labeled "Find what" — type the text or number you want to search for. The bottom field is labeled "Replace with" — type what you want to put in its place. If you are replacing a number with nothing (deleting it), leave the Replace field empty.

Excel searches for your exact text by default. If you type "2024" it will find "2024" but not "2024-01" or "Q1 2024". If you want to find partial matches, you need to uncheck the "Match entire cell contents" option, which appears in the dialog box. Once your search terms are entered, you are ready to choose how to replace them.

Replacing one match at a time versus all at once

The dialog box has two buttons: "Replace" and "Replace All". Use Replace if you want to check each match before changing it. Excel highlights the first match in your spreadsheet, and you can click Replace to change just that one, or click Find Next to skip it and look at the next match. This takes longer but is safer when you are not completely sure every match should change.

Use Replace All if you are confident every match should change. Excel changes all of them without stopping to ask. This is much faster for large spreadsheets. If you make a mistake, press Ctrl+Z when ready to undo the entire replace operation and go back to how the spreadsheet looked before.

Limiting the search to specific cells or columns

By default, Find and Replace searches your entire spreadsheet. If you want to change something in only one column or a specific range of cells, select that area first, then open Find and Replace. Excel will search only inside your selection. For example, if you select column B and then open Find and Replace, it will only look in column B, leaving all other columns untouched.

To select a single column, click the column letter at the top. To select a range like A1 through D50, click cell A1, then hold Shift and click cell D50. You can also type the range directly into the Name Box (the field that shows the cell address, usually on the left side of the formula bar) — type "A1:D50" and press Enter to select that range. Once your selection is highlighted, open Find and Replace and it will work only within those cells.

Using Match Case to distinguish between uppercase and lowercase

By default, Excel treats uppercase and lowercase the same way. If you search for "john" it will find "John", "JOHN", and "john" all together. If you need to distinguish between them — for example, to change only the lowercase "john" and leave "John" alone — check the "Match Case" option in the Find and Replace dialog.

This is useful when you have product codes or names where capitalization matters. For instance, you might want to replace "iPhone" with "iPhone 15" but leave "iphone" (a typo in your data) alone so you can fix it differently. With Match Case checked, your search becomes case-sensitive and will only find exact matches including the capitalization.

Finding and replacing with regular expressions for complex patterns

Regular expressions are search patterns that find things based on rules rather than exact text. For example, the pattern "^[0-9]" finds any cell that starts with a number. The pattern "[0-9]{3}-[0-9]{4}" finds phone numbers in the format 123-4567. To use regular expressions, check the "Regular expressions" option in the Find and Replace dialog, then type your pattern in the Find field.

Most spreadsheet users never need this feature. It is useful only for specialized tasks like finding all cells that match a certain format, or swapping the order of text in a consistent pattern. If you need to use regular expressions, search online for "Excel regular expression" plus the specific pattern you are looking for — the syntax is complex enough that looking up examples is faster than trying to figure it out from scratch.

Undoing a replace operation if something goes wrong

If you click Replace All and the results are not what you expected, press Ctrl+Z when ready to undo the entire operation. Excel will reverse every change that Replace All made and restore your spreadsheet to how it looked before. You can undo multiple times if you need to go back several steps.

This is why Replace All is safe even though it changes everything at once — you can always undo it. If you wait too long or make other changes to the spreadsheet first, the undo may not work, so fix mistakes right away. If you are nervous about a large replace operation, use Replace (one at a time) instead, or make a copy of your spreadsheet before you start.

Frequently Asked Questions

Will Find and Replace change text inside formulas?

Yes. If you have a formula like =VLOOKUP("Smith", A:A, 2, FALSE) and you search for "Smith" and replace it with "Jones", the formula becomes =VLOOKUP("Jones", A:A, 2, FALSE). This can break formulas if you are not careful, so use Replace (one at a time) to check each match before changing it.

Can I search for a line break or special character?

Yes, but the method depends on what you are looking for. To find a line break within a cell, check "Regular expressions" and use \n in the Find field. For other special characters like tabs, use \t. If you are looking for a specific symbol, you can usually just type it directly into the Find field.

What if I only want to replace the first few matches, not all of them?

Use the Replace button instead of Replace All. Click Replace to change the current match, then click Find Next to move to the next one. You can replace some matches and skip others by clicking Find Next without clicking Replace. Close the dialog when you are done.

Can Find and Replace work across multiple spreadsheets at once?

No. Find and Replace works only on the spreadsheet that is currently open. If you need to make the same change in multiple files, you have to open each one and run Find and Replace separately.

Does Find and Replace work on hidden rows or columns?

Yes. Even if rows or columns are hidden, Find and Replace will still search them and change them. If you want to exclude certain rows from the search, unhide them first, select only the rows you want to change, then open Find and Replace.