How to fix numbers stored as text
By the MyDataFixer team · Updated
The short answer
A number stored as text looks like a number but behaves like a word. SUM skips it, sorting puts 100 before 20, and some formulas show #VALUE!. In Excel, select the cells, click the small warning icon and choose Convert to Number. Keep codes with leading zeros, like 00123, as text on purpose.
How to recognise numbers stored as text
- The numbers sit on the left side of the cell (real numbers sit on the right, unless someone changed the alignment).
- Excel shows a small green triangle in the top-left corner of the cell.
- The total at the bottom is smaller than it should be, or the status bar shows only a “Count” and no “Sum” when you select them.
- Sorting puts 1, 10, 100, 2, 20 instead of 1, 2, 10, 20, 100.
Why it happens
- Imports and exports. Data from websites, banking apps and other systems often arrives as text.
- An apostrophe in front. Typing
'45forces Excel to keep it as text. - Extra characters. Spaces, currency signs (€, $), or thousands separators written as text, such as “1,250”.
- The cell was formatted as Text before the number was typed.
Example
| amount | what it is |
|---|---|
| 500 | a real number |
| '300 | text (apostrophe in front) |
| 200 | text (a space at the end) |
=SUM(...) of this column shows 500 instead of 1,000.
Fix it in Excel
These steps are for Excel on a Windows or Mac computer. The Excel app on phones and tablets doesn't have these menus; on a phone, use Google Sheets or MyDataFixer instead.
Method 1: Convert to Number (quickest)
- Select the cells with green triangles.
- Click the yellow warning icon that appears next to them.
- Choose Convert to Number.
Method 2: Text to Columns (for a whole column)
- Select the column.
- Go to Data → Text to Columns and click Finish straight away.
Excel reads every value again and turns plain numbers into real numbers.
Method 3: a formula
In a helper column, use =VALUE(A2), or =VALUE(TRIM(A2)) if there are spaces. Then copy the results and paste them back as values.
Fix it in Google Sheets
- Select the cells.
- Go to Format → Number → Number.
If that doesn't change them (for example values with an apostrophe or a space), use =VALUE(A2) in a helper column, then paste back as values. Removing extra spaces first with Data → Data cleanup → Trim whitespace also helps.
Fix it with MyDataFixer
Open your file in the Spreadsheet Cleaner and choose Convert numbers stored as text. It looks at columns that mostly hold numbers and finds the values written as text. You see each value before and after, then apply.
MyDataFixer is careful about values that could mean different things, and leaves them for you to check, with the reason:
- values with a decimal comma, percent signs, brackets or a minus sign at the end, such as “12,5”, “12%” or “(5)”;
- numbers with more than 15 digits, which a spreadsheet would round;
- codes with leading zeros, such as 00123, which are not counted as numbers at all.
The Error Detector finds numbers stored as text together with other problems. Both work on phones and tablets, and your file stays on your device.
When text is the right choice
Not every number should be a number. Codes, phone numbers, PIN codes and IDs should stay text, because you never add them up and their leading zeros matter. Convert only amounts, quantities, prices and other values you calculate with.
How to avoid it next time
- Clean imported data straight away: remove spaces, then convert numbers.
- Don't format amount columns as Text.
- Type numbers without currency signs or spaces; use a number format to show €, $ or commas.
From start to finish: an example
Priya downloads a sales report from her billing app. The total at the bottom says €45,000, but she knows sales were higher. She selects the amount column and sees green triangles on about a third of the cells: those amounts arrived as text. She removes extra spaces first, then uses Convert to Number. The total jumps to €68,500, the right figure. The invoice number column also had green triangles, but she leaves it alone: invoice numbers like 000451 are codes, and converting them would remove the zeros.
Quick summary
Numbers stored as text break totals and sorting. Convert them with Convert to Number or Text to Columns in Excel, Format → Number in Google Sheets, or the Cleaner, which skips values that could be read two ways. Keep codes as text.
Common mistakes
- Converting codes. Turning 00123 into a number removes the zeros.
- Changing only the format. Setting the format to Number doesn't always convert text that is already there.
Fix it in your browser
Free, no sign-up. Your file is processed on your device and never uploaded.
Questions and answers
Why doesn't SUM add up all my numbers?
Some of them are stored as text, and SUM skips text. Convert them to real numbers with one of the methods above.
What does the green triangle in a cell mean?
Excel thinks something may be wrong, most often a number stored as text. Click the cell and the warning icon to see the reason.
Should phone numbers be numbers or text?
Text. You never calculate with them, and a leading zero or + sign must be kept.
Why did MyDataFixer skip some values?
They could mean different things, for example 1,250 in a column that also uses decimal commas. The preview lists each skipped value with the reason so you can decide.
Can I convert numbers stored as text on my phone?
The Excel phone app has limited options. Google Sheets in a browser has Format → Number, and MyDataFixer's Spreadsheet Cleaner works on phones and tablets.
Does MyDataFixer upload my file?
No. Your file is checked and fixed in your browser, on your device.