Numbers Copied from a Website Won't Add Up in Excel? Fix Numbers Stored as Text
You copied a table from a website, a report or Wikipedia into Excel, and =SUM() returns 0, or some rows are skipped. Most of the time the numbers came in as text. This guide shows how to spot them and how to fix them with Excel's own tools: Convert to Number, Find and Replace, and a few formulas. The Excel steps are checked against Microsoft's support articles.
Common causes at a glance
| What the cell shows | Cause | Fix |
|---|---|---|
| 1,234 (left-aligned) | Stored as text | Convert to Number |
| 1,234 with an invisible space | Nonbreaking space from the web page | SUBSTITUTE, then TRIM |
| 1,234[1] or 1,234[a] | Footnote mark | Find and Replace |
| 1,500 kg, 20 USD | Unit text in the cell | Find and Replace |
| −500 | Minus sign character (U+2212), not a hyphen | Replace − with - |
| 500- | Trailing minus | Formula |
| (42) | Accounting-style negative | Replace ( with - and remove ) |
First, spot numbers stored as text
Excel aligns real numbers to the right of the cell and text to the left. Numbers stored as text often also get a small green triangle (an error indicator) in the top-left corner of the cell. A quick test: select the column and look at the status bar. If it shows a Count but no Sum, Excel is not reading the cells as numbers.
When the green triangle is there, the fix is built in:
- Select the cells you want to fix.
- Select the error button that appears next to the selection.
- Choose Convert to Number.
This is from Microsoft's Convert numbers stored as text to numbers in Excel. If the cells also contain extra characters such as a footnote mark, a unit or a nonbreaking space, Convert to Number will not work until you remove them with the steps below.
Convert many columns at once: Paste Special > Multiply
- Type
1in a blank cell formatted as General, and copy that cell. - Select the numbers stored as text.
- On the Home tab, select the arrow under Paste, then Paste Special.
- Under Operation, choose Multiply, then OK. Delete the cell with the 1.
Steps from Fix text-formatted numbers by applying a number format.
Remove nonbreaking spaces (the invisible culprit)
Web pages often put a nonbreaking space (character 160) between a number and its unit, or around values to keep them on one line. It looks like a normal space but is a different character. Microsoft's TRIM function page notes that TRIM does not remove the nonbreaking space on its own. Replace it with a normal space first, then trim, then convert:
- Insert an empty column next to the one you want to fix.
- In the new column, on the same row as the first value, enter the formula below (A2 is the cell to fix).
- Fill the formula down.
- Copy the results and paste them over the original column with Paste Special > Values, then delete the helper column.
=VALUE(TRIM(SUBSTITUTE(A2, CHAR(160), " ")))
SUBSTITUTE swaps character 160 for a normal space, TRIM removes the spaces at either end, and VALUE turns the text into a number. See also Microsoft's Top ten ways to clean your data.
Use Find and Replace for footnotes, units and currency text
- Select only the column you want to fix, so text in other columns is not changed.
- Press Ctrl+H (Control+H on a Mac), or go to Home > Find & Select > Replace.
- In Find what, type the text to remove, for example
[1]orkg. Leave Replace with empty. - Select Replace All.
- Repeat for each mark or unit. To remove every bracketed footnote at once, search for
[*]: the*is a wildcard that matches any characters.
The dialog names and the wildcard are described in Find or replace text and numbers on a worksheet. If the numbers are still left-aligned afterwards, use Convert to Number from above.
Fix negative numbers: −500, 500- and (42)
Check what the source means before you change anything; in financial tables, brackets and trailing minus signs usually mean a negative value, but read the table's notes.
- Minus sign character: some sites, including Wikipedia, write negatives with the typographic minus sign
−(U+2212) instead of a hyphen. Excel does not read it as a minus. Copy one−from the sheet into Find what and put-in Replace with. - Trailing minus: for values like
500-, Microsoft's article above suggests a formula such as=LEFT(A2,LEN(A2)-1)*-1in a helper column. - Accounting brackets: for values like
(42)that stayed as text, replace(with-, then replace)with nothing. Always remove both brackets, or the cell is still text. Select only the number cells first, so text like "(note)" is left alone.
What not to convert
Some values look like numbers but should stay as text. Check each column before replacing in bulk.
- IDs with leading zeros, such as
007or ZIP codes like02134. Excel removes leading zeros from numbers. Format the column as Text before pasting to keep them. - Phone numbers. Removing the dashes or converting them drops leading zeros and can change the value.
- Numbers longer than 15 digits, such as card or account numbers. Excel keeps only 15 significant digits, so the rest turn into zeros.
- Dates. Removing the slashes from
11/16/2026turns it into a plain number. - Percentages. Deleting the
%from12%leaves 12, which is not the same as 0.12.
The leading-zero and 15-digit rules are in Keeping leading zeros and large numbers.
Copy a table from a website to Excel without the mess: SumiTable
SumiTable, a free browser extension by Sh23 (store release in preparation), lists the tables on a page. Pick one and click "For Excel / Sheets (TSV)," then paste into Excel and each value lands in its own cell. Footnote marks like [1] (including Wikipedia's reference marks), empty rows and columns, and merged cells are cleaned up before copying, and extra spaces around values are removed. Notes such as "(Unit: thousand dollars)" above or below the table are kept apart from the header row. The free version works now, up to 200 rows per table. The conversion runs on your computer, and the page content is not sent anywhere.
The free version copies the values themselves as they appear on the page, so $1,200 or (42) come through unchanged; use the steps above if Excel leaves them as text. Cleaning numbers automatically (full-width digits, currency signs, △/▲ and bracket negatives) and saving as an Excel file (.xlsx) are planned for a future paid version (Pro), which is not on sale yet. See About SumiTable.
Summary
- Left-aligned numbers are stored as text: use Convert to Number, Paste Special > Multiply, or VALUE.
- Remove nonbreaking spaces with SUBSTITUTE and TRIM, and footnotes or units with Find and Replace.
- Turn −, trailing minus and bracket negatives into a normal minus, and leave IDs, phone numbers, dates and percentages as they are.
Related
- CSV shows garbled characters in Excel? How to open a UTF-8 CSV correctly
- How to convert an HTML table to Markdown
- Japanese version of this article (covers Japanese-specific formats such as full-width digits and △ negatives)