Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Remove Characters From Numbers in Excel

· 4 min read · Home Tech

In this article
  1. Strip the Unwanted Characters From Your Number Cells
  2. Match the Method to What Is Stuck in the Cell
  3. Worked Example: Cleaning a Price Column
  4. Symptom, Cause and Fix for Number Cells That Won't Behave
  5. What to Do After the Cells Are Clean

Use Find and Replace to strip unwanted characters in seconds, or the SUBSTITUTE and VALUE functions when you need a formula that updates automatically. Both leave a clean number that Excel can add, average and sort.

Time 5 min · Steps 6 · Level Easy

Strip the Unwanted Characters From Your Number Cells

  1. Select the affected column.Click the column letter at the top so every cell with the problem is highlighted before you start.
  2. Open Find and Replace.Press Ctrl+H, or go to Home > Find & Select > Replace (labels can differ slightly by Excel version).
  3. Type the character to delete.Put the character in the "Find what" box, for example a currency symbol or a stray letter, and leave "Replace with" empty.
  4. Replace all.Click Replace All and check the message telling you how many replacements were made, then click Close.
  5. Convert leftovers to real numbers.If cells still align to the right of the cell but refuse to sum, wrap them with =VALUE(A1) in a helper column and fill down.
  6. Check the result.Enter =SUM over the cleaned range in a scratch cell; a non-zero total that updates when you edit a cell confirms the text is gone.

Match the Method to What Is Stuck in the Cell

The fastest fix depends on what the extra characters are and how many cells you have. For a one-off cleanup of a few hundred rows, Find and Replace wins. For a sheet that keeps receiving messy pasted data, build a formula column so the cleaning happens every time.

If you want a formula instead of a one-time replacement, put the original data in column A and one of these in column B:

  • Remove a specific character: =SUBSTITUTE(A1,"$","")
  • Remove a character plus convert to number: =VALUE(SUBSTITUTE(A1,"$",""))
  • Remove any letters and keep digits: =SUMPRODUCT(MID(0&A1,LARGE(ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))*ROW(INDIRECT("1:"&LEN(A1))),ROW(INDIRECT("1:"&LEN(A1))))+1,1)*10^ROW(INDIRECT("1:"&LEN(A1)))/10)
  • Remove spaces that break number recognition: =VALUE(TRIM(A1))

After the formulas return clean numbers, you can copy column B and use Paste Special > Values over the originals so the helper column can be deleted.

Worked Example: Cleaning a Price Column

Suppose column A holds 12 rows of prices pasted from a website: $1,250, $980, $1,250 and so on. The dollar signs and commas stop Excel from treating them as numbers.

  1. Select column A, press Ctrl+H.
  2. Type $ in "Find what", leave "Replace with" blank, click Replace All. The message reports 12 replacements.
  3. Press Ctrl+H again, type , (a comma) in "Find what", leave "Replace with" blank, click Replace All. Another 12 replacements, since every price had a thousands separator.
  4. Test with =SUM(A1:A12). With values of 1250, 980, 1250 and the rest of the column, the total should equal the sum of the plain figures, and the cells should now right-align.

If the total is zero or a #VALUE! error appears, the cells are still text; add the =VALUE(TRIM(A1)) helper column and fill down.

Symptom, Cause and Fix for Number Cells That Won't Behave

SymptomLikely causeFix
Cells align left instead of rightCell is text, not a number=VALUE(A1) in a helper column, then paste back as values
SUM returns 0Hidden characters such as spaces or non-breaking spaces=VALUE(TRIM(A1)); for stubborn spaces use SUBSTITUTE(A1,CHAR(160),"")
Numbers show like 1.25E+03Column too narrow for the formatDouble-click the column border, or widen it manually
Trailing zeros vanish (1250 shows as 1250.0 or 1250)Number format, not the valueFormat Cells > Number and set decimal places to 0
Leading zeros disappear (007 becomes 7)Excel read the entry as a numberFormat the cells as Text first, then re-enter, or use a custom format of 000

What to Do After the Cells Are Clean

Once the numbers behave, lock the win in. Copy the cleaned range and use Paste Special > Values so formulas do not break if the original column is deleted later. If the data will be re-imported every week, save the SUBSTITUTE or VALUE formula in the workbook next to the import area, and the cleanup repeats itself.

Two follow-up questions come up often. To remove digits from a text string and keep the letters, SUBSTITUTE works one digit at a time: nest it like =SUBSTITUTE(SUBSTITUTE(A1,"1",""),"2","") and continue through the digits you need gone. To remove a fixed number of characters from the left of a code, use =RIGHT(A1,LEN(A1)-3) to drop the first 3 characters, or =LEFT(A1,LEN(A1)-2) to drop the last 2.

One caution worth knowing: Find and Replace changes your data permanently, and Undo may not rescue a large batch after other edits. Copy the sheet first (right-click the sheet tab > Move or Copy > Create a copy) so the originals survive any experiment.

Official source: Microsoft Support