To replace text or values in Excel, press Ctrl+H on Windows, enter the existing content in Find what and the new content in Replace with, then choose Replace or Replace All. You can also open it from Home > Find & Select > Replace; check the search scope before using Replace All so you do not change unintended cells.
What Replace Does in Excel
Excel’s Find and Replace tool searches worksheet content for a specified string and substitutes another string. It can update one match at a time or make all matching replacements within the chosen scope. For example, you could change every instance of “Dept.” to “Department” in a list, or correct a consistently mistyped product name.
Replace is different from editing a cell directly: it can find matching content across many cells at once. It is also different from a formula such as SUBSTITUTE, which returns changed text in another cell rather than overwriting the original cells. Find and Replace is useful for a one-time correction; a formula is often better when you need to preserve the source data or repeat a transformation as new rows arrive.
The tool does not replace the physical keyboard key or change what a key does. If you meant changing a keyboard shortcut, that is a separate Excel or operating-system setting; Ctrl+H is simply the shortcut that opens the replacement dialog in Excel for Windows.
How to Replace Text or Values
- Open the worksheet and, if appropriate, select the cells you want to search. With no range selected, Excel searches the current worksheet by default.
- Press Ctrl+H, or choose Home > Find & Select > Replace.
- In Find what, type the text, number, or characters to locate. In Replace with, type the replacement. Leave Replace with empty if you intend to remove the match.
- Choose Find Next to review a match, then Replace to change that occurrence and move to another. Choose Replace All to change every match in the search scope.
- Read Excel’s message reporting how many replacements it made, then inspect representative cells and undo with Ctrl+Z if the result is not what you intended.
For instance, if a worksheet contains “Pending review” in several status cells and you want them to say “In review,” enter the first phrase in Find what and the second in Replace with. Find Next lets you verify each location before changing it. Replace All is faster when the phrase has one unambiguous meaning throughout the selected area.
In Excel for Mac, Control+H opens Find and Replace in many keyboard setups; you can also use the Home tab’s Find & Select menu. In Excel for the web, use the Home tab’s Find menu and choose Replace if it is available in your version. The browser interface and keyboard handling can differ, so the ribbon command is a useful alternative when a shortcut does not open the expected dialog.
Choose the Search Scope Carefully
By default, Excel searches the active sheet, not necessarily every sheet in the workbook. In the Replace dialog, open Options if the extra settings are hidden. The Within setting lets you choose Sheet or Workbook. Choose Workbook only when you intend to search all worksheets, since one replacement can otherwise alter labels or notes on sheets you were not viewing.
A selected range can also limit the operation. To change a particular column or block, select those cells before opening Replace and confirm the selection is still active. When you want to search the entire sheet, click a single cell or clear the range selection first. If you have grouped multiple worksheet tabs, edits can affect corresponding cells on all grouped sheets; check the sheet tabs before making broad changes.
The Search setting controls whether Excel searches by rows or by columns, which affects the order in which Find Next visits matches. It does not normally change which cells are eligible for Replace All, but it can matter when you are reviewing results one at a time. The Look in setting determines whether Excel searches formulas, values, or notes, depending on the version and dialog options. If a search appears to miss a result, confirm that Look in matches what you see in the cell.
Match Options and Wildcards
Open Options in the dialog to see controls such as Match case and Match entire cell contents. Match case distinguishes capital letters: searching for “west” with the option enabled will not match “West.” Match entire cell contents limits a match to a cell whose full content is the search text. Without it, searching for “West” may also find “Northwest Region.” Use these options when a short term could occur inside a longer word or label.
Excel supports wildcard characters in the Find what field:
- An asterisk (*) matches any number of characters. Searching for “A*” can find text beginning with A.
- A question mark (?) matches one character. Searching for “t?p” can find “tap” or “tip.”
- A tilde (~) makes the next wildcard character literal. Search for “~*” to find an actual asterisk in cell content, or “~?” to find a question mark.
Use wildcards with care, especially with Replace All. A broad search such as * can match a great deal of text, and a pattern that seems specific may still match more entries than expected. Test it with Find Next first. Wildcard matching is for text patterns; it is not a regular-expression search, so patterns such as digit classes or complex rules do not work as regular expressions would.
Replacing Numbers, Formulas, and Formatting
Numbers can have a stored value and a displayed appearance that differ. For example, a cell may store the number 0.25 but display it as 25% because of percentage formatting. A date is also stored as a number and displayed using a date format. If you are trying to replace what is visible, check both the cell’s formula bar and its number format. Searching for the displayed date text may not behave like searching for its underlying serial value.
Formulas need special care. If Look in is set to Formulas, a search can find text inside a formula, and replacing it may modify the formula itself. For example, replacing a sheet name or text string inside formulas across a workbook can change calculation references or results. Before doing that, save a separate copy and test on a small range. If you want to change displayed results rather than formula definitions, confirm the Look in option and consider whether you should instead change the source cells or formula logic.
Find and Replace can also search or replace formatting through the Format buttons in the dialog. This is useful when you need to locate cells with a particular font, fill, or number format, or replace that formatting with another. Set the format criteria deliberately and clear them when finished; an old format criterion can remain active and make later searches seem to return no matches. Exact available format controls can vary slightly by Excel version.
When a Formula Is a Better Alternative
Find and Replace edits the matching cells in place. If you need to retain the original data, or want a repeatable cleanup column, use a worksheet formula instead. For example, with source text in A2, enter =SUBSTITUTE(A2,"old","new") in another cell to return the text with every occurrence of “old” replaced by “new.” Copy the formula down for other rows. This formula is case-sensitive; for a one-time edit across selected cells, Find and Replace may be simpler.
To replace only one occurrence of a string in a cell, SUBSTITUTE can take an instance number as its fourth argument. For example, with the original text in A2, =SUBSTITUTE(A2,"-","/",1) changes only the first hyphen to a slash. The original value remains untouched until you choose to copy the results and paste them as values over the source. That extra step is useful when you want to review the transformed output before committing it.
Common Problems and How to Fix Them
- No matches appear: Check spelling, spaces, Match case, Match entire cell contents, the selected range, and the Within and Look in settings. A regular space and a nonbreaking space can look alike but are different characters.
- Excel changed too many cells: Undo immediately with Ctrl+Z, then narrow the selection or use Match entire cell contents. Review matches with Find Next before running Replace All again.
- Only some sheets changed: Check whether Within is set to Sheet or Workbook. Also confirm that you did not expect a selected range or a grouped-sheet selection to behave like a workbook-wide search.
- A number or date is not found: Inspect the stored value and display format, then adjust Look in. A cell formatted to show leading zeros, for example, may contain a number rather than text with those zeros.
- Replacement affects formulas: Check whether Look in is set to Formulas. Undo, then decide whether the desired change belongs in the formula, the source data, or only in displayed text.
- Search results seem oddly broad: Look for * or ? in Find what and check whether they are acting as wildcards. Add a tilde before a wildcard character when you mean to find it literally.
One easily missed issue is a trailing space. Replacing “Green” may not match a cell that contains “Green ” if Match entire cell contents is enabled. Conversely, a search without that option may find “Green” inside a longer label. If imported data is inconsistent, inspect a few cells and use a formula-based cleanup or a carefully limited replacement rather than assuming every visually similar value is identical.
Safer Ways to Use Replace All
Replace All is efficient, but it acts in bulk. Before using it on important information, save a copy of the workbook or make a temporary copy of the affected worksheet. Start with a narrow selection, verify one match, and then expand the scope only if the results are correct. This is particularly important in workbooks containing formulas, identifiers, product codes, or repeated words with different meanings.
After replacing, inspect a few changed cells and any dependent totals or formulas. Ctrl+Z usually undoes a normal Find and Replace operation, but do not rely on undo as your only backup for important work. If the workbook is shared or stored in a cloud location, make sure you are editing the intended file and consider whether collaborators may be working in it at the same time.
Frequently Asked Questions
What is the shortcut for Replace in Excel?
In Excel for Windows, press Ctrl+H to open the Replace tab of Find and Replace. On Mac, Control+H commonly opens the dialog; use Home > Find & Select > Replace if the shortcut differs on your setup.
How do I replace a word throughout an Excel workbook?
Open Replace with Ctrl+H, enter the old and new text, expand Options, set Within to Workbook, and choose Replace All. Check the workbook scope and any Match options first, because the change can affect matching cells on other sheets.
How do I remove a word from cells?
Enter the word or phrase in Find what and leave Replace with blank, then use Find Next to check a match or Replace All to remove all matches in the chosen scope. Use Match entire cell contents if you want to clear only cells consisting entirely of that word.
Can Excel replace part of a cell’s text?
Yes. By default, the search can find text within a longer cell entry, so a phrase inside “Quarterly sales report” can be replaced without replacing the whole cell. Turn on Match entire cell contents when the whole cell must match.
Can I replace formatting instead of text?
Yes. Open the Replace dialog’s Format options to specify the formatting to find and the formatting to apply. Clear any saved format criteria when you finish, since they can restrict later searches.
Does Replace All change formulas?
It can, depending on the Look in setting. If Excel searches formulas, a matching string inside a formula can be changed. Review the setting and test on a copy before replacing formula text across a large range or workbook.
Related
- Project Contact List Excel Template: Build and Use It
- Project Plan Timeline Template Excel: Build One That Works
- Real Estate Profit and Loss Excel Template: A Guide
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel: Calculate Percentage Difference Between NumbersIf A2 contains the first number and B2 the second, calculate the percentage difference with =ABS(A2-B2)/AVERAGE(ABS(A2),ABS(B2)), then format…
- Create an Outlook Email Template: Step-by-StepTo create a reusable email template in classic Outlook for Windows, compose a message, then choose File >…
- How to Create a Signature Footer in Outlook for EmailTo create a signature footer in Outlook, open the signature settings for your version of Outlook, create and…
- Google Sheets Dropdown: Show Only Selected ValuesYes. In Google Sheets, a dropdown cell normally displays only the value you selected after the menu closes;…
- Excel Lagging and Not Responding? Causes and FixesIf Excel is lagging or shows Not Responding, first give it a moment to finish calculating or refreshing,…
- Excel and Google Sheets Training: What to LearnExcel and Google Sheets training teaches you to organize data, use formulas, summarize information, and share reliable spreadsheets.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.