To replace a value in one Excel cell, select the cell, type the new value, and press Enter; this overwrites its existing contents. To change matching text in one or more cells, use Home > Find & Select > Replace, or press Ctrl+H on Windows, then enter the text to find and its replacement.
What “Replace a Cell Value” Means
A cell can contain a number, text, a date, a formula, or no content. Replacing its value means changing what the cell contains, but it does not necessarily change its formatting, comments, or other properties. For example, typing 42 into a cell that contains 17 replaces the number; the cell’s font color and number format normally remain as they were.
There are two common meanings of “replace” in Excel:
- Overwrite one cell: enter a new value or formula in a specific location.
- Find and replace: locate text or numbers that match a search and substitute different content, potentially across many cells.
These methods have different effects. Typing into a cell changes only that cell. Replace All can change many cells at once, so check the search scope and matching options before using it.
Replace One Cell Manually
For a single cell, direct entry is usually the clearest method. Select the cell, type the replacement, and press Enter. Excel commits the entry and usually moves the selection down one row. To edit the existing contents instead of replacing all of them, double-click the cell or select it and press F2, then make the change and press Enter.
You can also select a cell and edit its contents in the formula bar above the worksheet. This is useful when a cell contains a long entry that is hard to see in the grid. If the cell contains a formula, typing a plain value over it removes the formula and its calculated result. If you only want to change part of a formula, edit the formula rather than entering a new constant.
To cancel an edit before committing it, press Esc. To reverse a completed edit, use Ctrl+Z on Windows or Command+Z on Mac, provided the action is still in the undo history. Saving, closing, or performing certain other actions can affect how far back you can undo.
Replace Text or Numbers Across a Worksheet
Find and Replace is appropriate when the same change needs to be made repeatedly. On Windows, press Ctrl+H or select Home > Find & Select > Replace. In the dialog, enter the existing text in Find what and the new text in Replace with. Choose Replace to handle matches one at a time, or Replace All to apply the change throughout the selected search scope. On Mac, use Home > Find & Select > Replace; keyboard shortcuts can differ with Excel version and system settings.
For example, if cells contain the product label “Old Model” and should say “Current Model,” enter Old Model as the search text and Current Model as the replacement. If you select a range first, Excel can limit the operation to that selection. If nothing is selected, check the dialog’s Within setting to confirm whether Excel searches the current sheet or the whole workbook. Searching the entire workbook can alter matching entries on tabs you were not viewing.
Before choosing Replace All, it is sensible to:
- Save a copy of the workbook or confirm that the current version is recoverable.
- Select the intended range, if the change should be limited to particular cells.
- Review Find what, Replace with, and the search scope.
- Use Find Next or Replace first to inspect a match when the consequences are uncertain.
Replace All reports how many replacements it made. Review the affected area afterward, especially when the search term is short or appears in formulas, labels, and unrelated text.
Control Which Matches Excel Changes
The Replace dialog includes options that can prevent unintended matches. Match case distinguishes capitalization, so a search for “north” can be treated differently from “North.” Match entire cell contents restricts a match to cells whose complete contents equal the search text. Without that option, a search for “cat” can match the word inside “catalog.”
Use the Look in setting carefully. Depending on the workbook and Excel’s available dialog options, you can search cell values or formulas. Searching values is useful for visible results; searching formulas can locate text within formula expressions. A formula cell may display a number while its underlying formula contains text, so the search mode affects what Excel finds.
Find and Replace also recognizes wildcard characters in searches. An asterisk represents a sequence of characters, and a question mark represents one character. To search for a literal wildcard character, precede it with a tilde: for example, ~? searches for a question mark rather than treating it as a wildcard. Wildcards can be powerful, but they also make broad searches easier to misjudge. Test the pattern with individual matches before using Replace All.
Replace Part of Text with a Formula
If you want to generate changed text while keeping the original cells intact, use a formula in another column. This creates a result you can inspect before deciding whether to replace the source data. Formulas update if their referenced cells change; they do not overwrite those source cells automatically.
With “Jon Smith” in A2 and “Jon Lee” in A3, enter =REPLACE(A2,1,3,"John") in B2 and copy it down. The formula replaces the first three characters with “John,” so B2 returns “John Smith” and B3 returns “John Lee.” REPLACE works by character position, making it suitable when the text to change is always at a known position and has a known length.
With codes AB-17 and CD-24 in A2 and A3, enter =SUBSTITUTE(A2,"-","/") in B2 and copy it down. B2 returns AB/17 and B3 returns CD/24. SUBSTITUTE finds specified text wherever it appears and replaces it. It can also take an optional fourth argument to replace only a particular occurrence, which is useful when the same text appears more than once in a cell.
When the formula results are correct and you want to replace the original entries, copy the result cells, select the destination cells, then choose Home > Paste > Paste Values. This pastes the calculated values rather than formulas. Confirm the results first: pasting values over the source range removes the original contents and may also break formulas elsewhere that depend on them.
Replace a Formula or Keep the Calculation
A formula cell contains an expression that calculates a result. If you type a fixed number or text into it, the formula is gone, even if the displayed result looks similar afterward. For example, replacing a formula that calculates a total with the current total freezes that value: it will not respond when the underlying amounts change.
If the goal is to change how a result is calculated, edit the formula itself. If the goal is to store its current result permanently, copy the cell and paste values. If the goal is to change the data feeding the formula, update the source cell instead. Choosing the right target helps avoid a spreadsheet that looks correct now but stops updating later.
Also distinguish a cell’s contents from its appearance. Typing a new value generally keeps the existing formatting. To change only the appearance, use the formatting controls rather than replacing the value. To clear contents while retaining formatting, select the cell and press Delete on Windows; the cell’s formatting is not normally removed. On Mac, the Delete key behavior depends on the keyboard, so use the Clear command from the Home tab if needed and choose the appropriate clear option.
Common Problems and Safe Checks
If Excel says it cannot find a value, check for extra spaces, punctuation, spelling, and the Look in setting. A cell that appears to contain 100 may actually contain text, or a formula may display 100 while the search is set to look in formulas. Formatting can also make the displayed appearance different from the underlying value; for instance, a date is stored as a serial number and displayed using a date format.
If a replacement changes more cells than expected, undo it immediately with Ctrl+Z on Windows or Command+Z on Mac, then narrow the selected range or adjust the matching options. Avoid running Replace All on a whole workbook just because one visible sheet has the target text. A match in a note, formula, or another worksheet can have unintended effects.
When a result appears unchanged, verify whether the new value differs only in a way hidden by formatting, such as decimal places or date display. When a formula result does not update, check whether calculation is set to Manual under Formulas > Calculation Options. Changing calculation settings affects workbook recalculation, not the replacement operation itself.
Choose the Right Replacement Method
The best method depends on whether the change is isolated, repeated, or meant to remain dynamic. Direct entry is simplest for one cell. Find and Replace is efficient for consistent edits across a range, but requires careful scope and match settings. A formula is preferable when you want to retain the originals, review the transformation, or have results recalculate from source data.
- One known cell: select it and type the new entry.
- Repeated text or number pattern: use Find and Replace, inspecting matches before Replace All when needed.
- Position-based text change: use REPLACE in a helper column.
- Change a particular substring wherever it appears: use SUBSTITUTE in a helper column.
- Keep formula results but remove formulas: copy and paste values after checking the output.
Regardless of method, retain a recoverable copy before broad changes to important workbooks. This is particularly helpful when replacing values in imported data, financial models, or shared files where a single change can affect many downstream calculations.
Frequently Asked Questions
How do I replace a value in Excel without changing the formatting?
Select the cell, type the new value, and press Enter. Excel normally replaces the contents while retaining the cell’s existing formatting.
How do I replace all occurrences in Excel?
Open Home > Find & Select > Replace, fill in Find what and Replace with, confirm the search scope, then select Replace All. Use Replace first if you want to check a match before changing every occurrence.
Can I replace part of a cell’s text without changing the original cell?
Yes. Put a REPLACE or SUBSTITUTE formula in another cell, using the original cell as its input. Check the result, then copy and use Paste Values over the original only if you intend to overwrite it.
How do I replace a formula with its current result?
Copy the formula cell, then use Paste Values on the same cell or destination range. This retains the displayed calculated result as a value, but it no longer updates when the formula’s inputs change.
Why does Excel replace only some of the matches?
Check whether a range was selected, whether Match case or Match entire cell contents is enabled, and whether the search is limited to a sheet or set to look in formulas. These settings can exclude matches that otherwise seem relevant.
Related
- Excel Not Clicking the Correct Cell? Causes and Fixes
- Excel Copy and Paste Rows Into Columns: 3 Easy Methods
- Excel Not Responding: Should You Wait or Close It?
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Xlookup vs vlookup?XLOOKUP defaults to exact matches and can return values from either side. See where VLOOKUP still fits and…
- Excel MID and FIND Functions: How to Extract Text in ExcelWith the text INV-2026-047 in A2, use =MID(A2,FIND("-",A2)+1,4) to extract the year; the result is 2026. MID returns…
- Excel Cell Range Average: Formula and ExamplesTo average a range in Excel, use AVERAGE: if A2:A5 contain 10, 20, a blank cell, and 0,…
- Filter Excel Horizontally: Methods That WorkYes, you can filter Excel horizontally, but the standard Filter dropdown is designed to filter records in rows,…
- COUNTIF in Excel: Count Cells That Contain NumbersYes—COUNTIF can count cells that meet a numeric condition, and it can find text containing a particular digit.…
- Excel Sum Rows Based on Cell Value: Formulas That WorkTo total values in rows where a cell matches a condition, use Excel’s SUMIF function. With categories in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.