Your SUM shows 0, your VLOOKUP returns #N/A, and sorting puts 100 before 20. The cause is often the same: numbers stored as text.
They look like numbers, but Excel treats them as words. Here’s how to spot them and six ways to fix them.
How to spot numbers stored as text
- Left-aligned: real numbers align to the right by default; text aligns left.
- Green triangle: a small green triangle appears in the top-left corner of the cell.
- Leading apostrophe: the formula bar shows
'1001. - SUM ignores them: the status bar shows a Count but no Sum when you select the cells.
- ISTEXT test:
=ISTEXT(A2)returns TRUE.
Why it happens
- Data exported from accounting software, websites or databases.
- Cells formatted as Text before the numbers were typed.
- Numbers copied with spaces or invisible characters.
- An apostrophe typed in front of the number.
Method 1: Convert to Number (quickest)
- Select the cells with green triangles.
- Click the yellow warning icon that appears next to the selection.
- Choose Convert to Number.
This works well for a few hundred rows. On very large ranges it can be slow, so use Method 2.
Method 2: Text to Columns (best for whole columns)
- Select the column.
- Go to Data → Text to Columns.
- Click Finish straight away.
Excel re-enters every value and converts text numbers into real numbers. It’s fast, even on thousands of rows.
Method 3: Paste Special Multiply
- Type 1 in an empty cell and copy it.
- Select the text numbers.
- Right-click → Paste Special → choose Multiply → OK.
Multiplying by 1 forces Excel to treat each value as a number. Delete the helper cell afterwards.
Method 4: The VALUE function
Use a formula in a helper column:
=VALUE(A2)

Copy the results and paste them back as values (Paste Special → Values). A shorter trick that does the same job is =A2*1 or =--A2.
Method 5: Remove spaces first
If the methods above don’t work, the cells probably contain spaces or non-breaking spaces copied from a website. Clean them first:
=VALUE(TRIM(SUBSTITUTE(A2, CHAR(160), "")))
SUBSTITUTE removes non-breaking spaces (character 160) and TRIM removes normal extra spaces.
Method 6: Change the cell format and re-enter
If cells are formatted as Text, changing the format to General doesn’t convert existing values on its own. After changing the format, use Method 2 (Text to Columns) to re-enter them, or press F2 and Enter on each cell for small ranges.
Fixing it inside a lookup formula
Sometimes you can’t change the source data. Convert inside the formula instead.
Lookup value is text, the list holds numbers:
=XLOOKUP(VALUE(E2), A2:A100, C2:C100)
Lookup value is a number, the list holds text:
=XLOOKUP(E2&"", A2:A100, C2:C100)
For more lookup troubleshooting, read How to Fix #N/A in VLOOKUP and XLOOKUP.
When you want numbers stored as text
Some values look like numbers but should stay as text: phone numbers, ZIP or postal codes with leading zeros, ID numbers, and credit-card-style codes. Converting “00123” to a number turns it into 123. For these, keep the column formatted as Text, and tell Excel to ignore the warning: click the yellow icon and choose Ignore Error.
The opposite: how to convert numbers to text
Sometimes you need the reverse, for example to keep leading zeros in phone numbers, product codes or IBANs, or to join a number into a sentence. Four ways:
| Method | How | Example result |
|---|---|---|
| Apostrophe | Type '00123 in the cell | 00123 (the apostrophe is hidden) |
| Text format | Select cells → Ctrl + 1 → Text, then type the numbers | Anything you type stays as typed |
| TEXT function | =TEXT(A2,"00000") or =TEXT(A2,"#,##0.00") | 42 → 00042; 1234.5 → 1,234.50 |
| Join with & | ="Total: "&TEXT(B2,"#,##0") | Total: 2,500 |
Remember that text numbers will not add up with SUM. Keep a numeric copy for calculations. More format codes are in our Excel TEXT function guide.
In Google Sheets
Google Sheets doesn’t show green triangles. Select the cells and choose Format → Number → Number, or use =VALUE(A2) in a helper column. If that fails, the values likely contain spaces; use the TRIM and SUBSTITUTE formula above.
Summary
- Text numbers are left-aligned and show a green triangle.
- Use Convert to Number for small ranges and Text to Columns for large ones.
- Clean spaces with TRIM and SUBSTITUTE when nothing else works.
- Keep codes with leading zeros as text on purpose.
See also: Every Excel Error Explained.
FAQ
Why does Excel say “Number stored as text”?
The cell contains digits but Excel treats them as text, usually because the data was imported, copied from another program, typed into a Text-formatted cell or entered with an apostrophe. The small green triangle in the corner is the warning.
How do I convert a whole column of text to numbers?
Select the column, go to Data → Text to Columns and click Finish. It converts every cell in one step and works even when the green triangles do not appear.
Are numbers considered text in Excel?
No. Numbers are a separate data type and line up to the right. Text lines up to the left. A number only becomes text if it is stored that way, and then SUM, sorting and lookups treat it differently.
How do I stop Excel from removing leading zeros?
Format the cells as Text before you type, type an apostrophe first (‘00123), or use a custom number format such as 00000 if you still need the value to be a number.
How do I hide the green triangle without converting?
Click the warning icon and choose Ignore Error, or turn off the rule in File → Options → Formulas → “Numbers formatted as text or preceded by an apostrophe”.
Related guides
- Clean Messy Data in Excel with TRIM, CLEAN and PROPER
- Every Excel Error Explained: #VALUE!, #REF!, #DIV/0! and More
- How to Fix #N/A in VLOOKUP and XLOOKUP (6 Easy Fixes)
- Why Is My Excel Formula Showing as Text? 5 Quick Fixes
- How to Split First and Last Names in Excel (4 Easy Ways)
- TEXTSPLIT, TEXTBEFORE and TEXTAFTER in Excel (Easy Examples)