The fastest way to replace text in Excel

Open the spreadsheet you want to edit, then press Ctrl+H on Windows or Command+H on Mac. This opens the Find & Replace dialog box. Type the word or number you want to find in the "Find what" field, type what you want to replace it with in the "Replace with" field, then click "Replace All" to change every instance at once, or "Replace" to change them one at a time.

If you only want to replace text in certain cells rather than the whole sheet, select those cells first before opening Find & Replace. The tool will then work only on your selection.

Key Takeaways

  • Press Ctrl+H (Windows) or Command+H (Mac) to open Find & Replace, then type the text to find and the text to use instead.
  • Click "Replace All" to change every match at once, or "Replace" to review each one before changing it.
  • Select specific cells or a range before opening Find & Replace if you want to change text only in that area, not the whole sheet.
  • Use "Match entire cell contents" if you want to replace only cells that contain exactly that text and nothing else.
  • The "Options" button reveals settings like "Match case" to distinguish between uppercase and lowercase, and "Find All" to see every match before replacing any.

Replacing one instance at a time versus all at once

When the Find & Replace dialog is open, you have two choices. "Replace All" changes every match in your selection or sheet when ready. "Replace" highlights one match at a time and lets you decide whether to replace it or skip to the next one. Use "Replace All" when you are confident the word you are replacing will not cause problems — for example, changing "2024" to "2025" across an entire budget sheet. Use "Replace" when the word appears in different contexts and you need to check each one — for example, if you are replacing "Sales" and want to make sure you do not accidentally change "Sales Tax" or "Sales Rep".

If you click "Replace All" by mistake, press Ctrl+Z (Windows) or Command+Z (Mac) when ready to undo the changes.

Using Match Case and other options

Click the "Options" button in the Find & Replace dialog to reveal additional settings. Match case tells Excel to distinguish between uppercase and lowercase — so searching for "john" will not find "John" or "JOHN". This is useful when you need to replace only lowercase versions of a word, or when you are working with codes or product names that must stay in a specific format.

Match entire cell contents replaces only cells that contain exactly what you typed, with nothing else in them. Without this option, Excel will replace the text even if it is part of a longer phrase. For example, if you search for "cat" without this option, it will replace the "cat" in "category" and "concatenate". With this option checked, it will only replace cells that say exactly "cat" and nothing more.

The Find All button shows you every match in a list before you replace anything. This is helpful if you want to see how many times the word appears or to spot-check a few matches before committing to "Replace All".

Replacing text in specific columns or ranges

If your spreadsheet is large and you only want to replace text in certain columns, select those columns first. Click the column header to select an entire column, or click and drag across multiple column headers. Then open Find & Replace with Ctrl+H. The replacements will only happen in the columns you selected.

You can also select a specific range of cells by clicking on the first cell, holding Shift, and clicking on the last cell you want to include. Or type the range directly into the Name Box (the field that shows the cell address, usually in the top left). For example, type A1:C50 to select cells A1 through C50. Then open Find & Replace, and it will work only on that range.

Replacing numbers and formulas

Find & Replace works on numbers the same way it works on text. If you want to change all instances of the number 100 to 200, type 100 in "Find what" and 200 in "Replace with". However, be careful: if your spreadsheet contains formulas that reference the number 100, replacing it will change the formula itself, which may break your calculations. Always use "Replace" one at a time if you are working with numbers that might be part of formulas, or use "Find All" first to see exactly where the number appears.

You cannot use Find & Replace to change the results of a formula — only the formula itself. If you want to change what a formula calculates, you need to edit the formula directly by clicking the cell and typing in the formula bar.

When Find & Replace does not work as expected

If you search for text and Excel says it found no matches, check whether the text is hidden in a merged cell, a comment, or a cell that is formatted as a different data type. Find & Replace by default searches cell contents only, not comments or cell notes. If you need to search comments, you must use a different method — there is no built-in option for this in the standard Find & Replace dialog.

Another common issue: if you are working with numbers that look the same but are formatted differently (for example, one is text and one is a number), Find & Replace may not match them. Try searching without "Match entire cell contents" first, or check the cell format by right-clicking the cell and selecting "Format Cells".

Replacing text across multiple sheets

Find & Replace works on only one sheet at a time by default. If you want to replace text across your entire workbook, you need to select all sheets first. Right-click on any sheet tab at the bottom of the screen and select "Select All Sheets". The sheet tabs will turn white to show they are all selected. Now open Find & Replace with Ctrl+H, and your replacements will explore to every sheet in the workbook.

When you are done, right-click a sheet tab again and select "Deselect All Sheets" to go back to working on individual sheets. If you forget to deselect, any changes you make will affect all sheets, which can cause problems.

Frequently Asked Questions

Can I undo a Replace All if I made a mistake?

Yes. Press Ctrl+Z (Windows) or Command+Z (Mac) when ready after the replacement to undo it. If you have made other changes since then, you may need to press Ctrl+Z multiple times to get back to the state before the replacement. If you have already saved the file, undo will not work — you will need to reopen the file without saving.

How do I replace text that contains special characters like asterisks or question marks?

Special characters like * and ? have meaning in Find & Replace — they act as wildcards. To search for the literal character, check the "Use regular expressions" option (if available in your version) or type a backslash before the character. For example, type \* to find an actual asterisk. If you are unsure, use "Find All" first to see what matches.

Can I replace text with a line break or special formatting?

You can insert a line break in the "Replace with" field by pressing Ctrl+J (Windows) or Command+Option+Enter (Mac). For other special formatting like bold or color, Find & Replace cannot do this — you would need to use conditional formatting or manually format the cells after replacing the text.

What is the difference between Replace and Replace All?

Replace changes one match at a time and asks you to confirm each change. Replace All changes every match when ready without asking. Use Replace when you want to review each change, and Replace All when you are confident all matches should be changed the same way.

Does Find & Replace work in Excel Online?

Yes. In Excel Online, press Ctrl+H to open Find & Replace, and it works the same way as the desktop version. However, some advanced options like "Use regular expressions" may not be available in the online version. If you need those features, read the file and use the desktop version of Excel.