Excel Find and Replace
Upload a sheet or paste your cells, enter the text to find and what to put in its place, and download the changed file.
Updated
How to find and replace
- Choose your file, or paste cells copied from Excel or Google Sheets and select Use pasted data.
- Type the text to look for in Find.
- Type the new text in Replace with. Leave it empty to delete the found text.
- Leave First row is a header ticked to keep the column names in row 1 unchanged.
- Tick Match case if capital letters must match. Tick Match entire cell to change a cell only when its whole content equals the search text.
- Under Columns to change, select the columns to work on. With none selected, every column is searched.
- Check Cells changed and the preview, then select Download .xlsx or Download .csv.
The count and the preview update as you type. The search is for the exact characters you enter. An asterisk or a question mark is treated as that character and has no wildcard meaning here, which makes it safe to replace text such as * or ? itself. Numbers are matched by their digits, and a number stays a number when the result is still numeric.
Find and replace in Excel itself
The Replace window
- Press Ctrl+H, or go to Home > Find & Select > Replace.
- Fill in Find what and Replace with.
- Select Find Next and Replace to step through one match at a time, or Replace All to change everything at once.
Excel reports how many replacements it made. Press Ctrl+Z to undo them all.
To limit the change to part of the sheet, select those cells first. With a single cell selected, Excel searches the whole sheet.
Options worth knowing
Select Options to show the full window.
| Option | What it does |
|---|---|
| Within | Search the current sheet or the whole workbook. |
| Match case | Makes the search case-sensitive. Off by default. |
| Match entire cell contents | Changes a cell only when the search text is its whole content. |
| Look in | On the Replace tab this is Formulas, so text inside formulas can be changed too. |
Match entire cell contents matters with short search text. Replacing 0 with N/A without it turns 100 into 1N/AN/A.
Wildcards
| Character | Meaning | Example |
|---|---|---|
* |
Any number of characters, including none | S*d finds Sad and Started |
? |
Exactly one character | S?t finds Sat and Set |
~ |
Treat the next character literally | ~? finds a question mark |
Wildcards work in Find what only. In Replace with they are plain characters. A common use is to cut everything after a marker: find (* and replace with nothing to remove a bracketed note at the end of each cell.
The SUBSTITUTE function
=SUBSTITUTE(A2, "Ltd", "Limited")
SUBSTITUTE takes the text, the old text and the new text, in that order. It replaces every occurrence, is case-sensitive, and does not accept wildcards. A fourth argument picks one occurrence. This changes only the second hyphen:
=SUBSTITUTE(A2, "-", "/", 2)
The formula writes its result in a new cell and updates when A2 changes, so the source column stays intact.
In Google Sheets
Press Ctrl+H, or choose Edit > Find and replace. Choose the range to search, then tick Match case or Match entire cell contents as needed. Google Sheets has no * and ? wildcards in this window. Tick Search using regular expressions for pattern matching instead. SUBSTITUTE takes the same arguments as in Excel.
Which method to use
| Situation | Best option |
|---|---|
| One-off change in a file you were sent | This page, or Ctrl+H |
| You do not have Excel open | This page |
The text contains * or ? |
This page, or ~ before the character in Excel |
| You need a pattern, such as anything in brackets | Ctrl+H with wildcards |
| The original column must stay unchanged | =SUBSTITUTE() |
| The change must repeat on new data | =SUBSTITUTE() |
| You need to split a cell at a character | Text to columns |
Mistakes to avoid
- Replacing part of a longer word. Changing
MrtoMisteralso turns Mrs into Misters. Include a trailing space or full stop in the search, or match the entire cell. - Short search text on numbers. Replacing
1changes 10, 21 and 1001 as well. Use the whole-cell option. - Searching the wrong scope. Replace All on a whole workbook can change sheets you are not looking at. Check the Within setting before you confirm.
- Breaking formulas. Excel’s Replace changes text inside formulas, including cell references and function names. Select only the value cells first.
- Losing leading zeros. Replacing a character so that only digits remain, such as removing the hyphen from 020-555, lets Excel convert the result to the number 20555. Format the column as Text first.
Limits
- 50 MB per file. Formats: .xlsx, .xls, .xlsm, .csv, .tsv, .txt and .ods.
- Literal text only. No wildcards and no regular expressions.
- One find and one replacement at a time, on one sheet. For a second change, upload the downloaded file again.
- The file is read on your device and is not uploaded.
- The download contains values. Formulas are replaced by their results, and cell formatting is not carried over.
Questions
What is the shortcut for find and replace in Excel?
Ctrl+H opens the Find and Replace window on the Replace tab. Ctrl+F opens the same window on the Find tab. The menu path is Home > Find & Select > Replace.
How do I find and replace in one column only?
Select the column before you press Ctrl+H. When more than one cell is selected, Replace All changes only the selection. In the tool above, select the column under Columns to change.
How do I use wildcards in Excel find and replace?
An asterisk stands for any number of characters and a question mark for one character. Searching for Jo*n finds John and Johnson. To search for a real asterisk or question mark, put a tilde in front of it, as in ~*.
How do I delete text with find and replace?
Enter the text in Find what and leave Replace with empty, then select Replace All. The tool above works the same way when Replace with is left empty.
Why does Excel say it cannot find anything to replace?
Open Options and check three things. Match entire cell contents may be ticked, Within may be set to the wrong scope, or a format may still be set from an earlier search. A small selection also limits the search to those cells.
Is there a formula for find and replace?
Yes. =SUBSTITUTE(A2, "Ltd", "Limited") returns the text of A2 with every Ltd changed to Limited. It is case-sensitive and leaves the original cell as it was.