In Excel: press Ctrl+H to open Find & Replace, and turn on "Match entire cell contents" (under Options) if some cells should not be partially replaced; for a formula-driven replacement use =SUBSTITUTE(A2,"old","new") to swap a number by what it IS, or =REPLACE(A2,start,count,"new") to swap characters by WHERE they are in the cell. This is not a job for VALUE() — VALUE() only converts a numeric-looking text string into a real number, it does not search for or swap out any digits.
On this page7
For a one-time sweep across a sheet or selection, press Ctrl+H, enter the number to find and its replacement, and click Replace All.
Open Options in that dialog and tick "Match entire cell contents" if only cells that are EXACTLY that number should change.
For a live formula that keeps updating as the source changes, use =SUBSTITUTE(A2,"old","new") to replace by matching content.
Use =REPLACE(A2,start_num,num_chars,"new") instead when the replacement is defined by a fixed position (e.g. always the first 3 characters), regardless of what those characters are.
Do not reach for VALUE() here — it converts text-that-looks-numeric into a real number and performs no find-or-replace at all.
What this does
Three different tools answer to "replace a number," depending on the job. Ctrl+H's Find & Replace is a one-time, dialog-driven sweep across a sheet or selection. =SUBSTITUTE() replaces every occurrence of specific text it finds inside a cell, living as a formula that updates automatically as the source changes. =REPLACE() ignores what the characters actually say and swaps a fixed span of positions instead — the right tool when the replacement location is fixed but the surrounding value varies. None of the three is VALUE(): that function only changes a cell's data TYPE (text that looks like a number becomes a real number), and performs no search or substitution whatsoever. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “replace numbers in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a text operation that turns messy entries into clean, usable data, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A2:A6 contain the codes "SKU-100", "SKU-100X", "SKU-200", "SKU-100Y", "SKU-300". Running Ctrl+H with Find "100", Replace "150", and "Match entire cell contents" left OFF would also touch "SKU-100X" and "SKU-100Y" — Excel matches "100" as a substring anywhere in the cell — turning them into "SKU-150X" and "SKU-150Y" even though only the plain "SKU-100" row needed changing. Turning "Match entire cell contents" ON limits Replace All to cells whose ENTIRE content equals "100" exactly, which none of these are (they read "SKU-100", not just "100"), so here a formula is the more precise tool: =SUBSTITUTE(A2,"100","150") changes A2 to "SKU-150" and, applied to A3, correctly also turns "SKU-100X" into "SKU-150X" — SUBSTITUTE has no whole-cell restriction, only the Ctrl+H checkbox does. "Replace a number" sounds like one job but is really three different tools depending on whether the change is one-time or ongoing, and whether the match should be by exact content or by fixed position — picking the wrong one either replaces too much or silently does nothing at all. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. For “replace numbers in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Reaching for
=VALUE(A2)expecting it to replace a number — VALUE() only changes the data TYPE of a cell that already holds the right digits; it searches for and swaps nothing. - Running Ctrl+H without "Match entire cell contents" and unintentionally editing partial matches inside longer codes or values.
- Confusing
SUBSTITUTE(matches by content, anywhere in the text) with REPLACE (matches by position, regardless of content) and getting a plausible-looking but wrong result when the two are swapped. - Using Ctrl+H's Replace All across an entire sheet without first selecting a range, changing numbers in unrelated columns that happened to contain the same digits.
Frequently asked questions
How do I replace one number with another everywhere in a sheet?
Ctrl+H, type the number to find and its replacement, and click Replace All; tick "Match entire cell contents" first if the number could also appear as part of a longer value.
What is the formula to replace a number in a cell?
=SUBSTITUTE(A2,"100","150") replaces every occurrence of "100" inside A2 with "150," staying live as a formula.
Do Ctrl+H and SUBSTITUTE work the same way in Google Sheets?
Yes — Ctrl+H opens the same Find and replace dialog with a "Match entire cell contents" option, and =SUBSTITUTE(A2,"100","150") behaves identically in Sheets.