Why Excel treats some numbers as text, and how to fix it

Excel sometimes stores numbers as text instead of actual numbers. This happens when you import data from another program, copy from a website, or when a column is formatted as text before you paste. When a number is stored as text, Excel won't let you use it in math formulas, and it aligns to the left instead of the right in its cell.

You can tell a number is stored as text when a formula that should add them up returns zero or an error, or when you see a small green triangle in the corner of the cell. The good news is that converting text numbers to real numbers takes just a few clicks, and the method you choose depends on how many cells need fixing.

Key Takeaways

  • Text numbers align left in their cells and won't work in math formulas — real numbers align right.
  • The fastest fix for a few cells is to use Find and Replace with a regular expression, which takes under a minute.
  • For larger columns, paste the numbers into a blank column using Paste Special with the Add operation, which converts them automatically.
  • The VALUE function converts text numbers one cell at a time and works when you need to keep the original column intact.
  • After conversion, delete the green error triangles by selecting the cells and choosing "Ignore Error" from the warning menu.

The fastest method: Find and Replace for small batches

If you have fewer than 20 cells to fix, Find and Replace is the quickest route. Select the cells that contain the text numbers, then open Find and Replace by pressing Ctrl+H (Windows) or Command+H (Mac).

In the Find field, type a single period: . Leave the Replace field empty. Before you click Replace All, check the box that says "Use regular expressions" — this is usually at the bottom of the dialog. Now click Replace All. This removes any decimal points and forces Excel to reread the cells as numbers. If your numbers don't have decimals, just click Replace All without entering anything in the Find field — this still triggers the conversion.

If that doesn't work, close the dialog and try this instead: select the cells, then go to the Data tab at the top and click "Text to Columns." Click Next twice, then Finish. Excel will convert the text to numbers in place without changing anything else about the cells.

The reliable method: Paste Special with Add for larger columns

This method works on any size column and is less likely to cause problems. First, find an empty column next to your text numbers. In the first empty cell, type the number 0 and press Enter. Select that cell again and copy it (Ctrl+C or Command+C).

Now select the entire range of text numbers you want to convert. Right-click and choose Paste Special, or press Ctrl+Shift+V (Windows) or Command+Shift+V (Mac). In the Paste Special dialog, look for the Operation section. Click the radio button next to Add, then click OK. Excel adds zero to each cell, which forces it to treat them as numbers. The values stay exactly the same, but now they're real numbers instead of text.

Delete the cell with the 0 in it and the empty column. Your original column now contains actual numbers that will work in formulas.

The flexible method: VALUE function to keep both versions

If you need to keep the original text column and create a new column of real numbers, use the VALUE function. Click on an empty cell next to your first text number and type =VALUE(A1), replacing A1 with the cell reference of your text number. Press Enter.

Excel converts that single text number to a real number in the new cell. Now select the cell you just created and copy it down to match the length of your original column. The fastest way is to double-click the small square at the bottom right corner of the cell — Excel will automatically fill down as far as your data extends.

Once the entire column is filled, you can delete the original text column if you no longer need it, or keep both for reference.

Dealing with the green error triangles

After you convert text numbers, Excel sometimes leaves a small green triangle in the corner of each cell as a warning. This doesn't affect your data — the numbers are converted and will work in formulas. But if the triangles bother you, they're easy to remove.

Select all the cells with green triangles. A small icon will appear next to the selection. Click it and choose "Ignore Error." The triangles disappear. If you don't see the icon, go to the File menu, click Options (Windows) or Preferences (Mac), find the Formulas or Error Checking section, and turn off the warning for "Numbers stored as text."

Checking that the conversion actually worked

After you convert, click on one of the cells and look at where it sits in the cell. Real numbers align to the right side of the cell. Text numbers align to the left. If your numbers are now on the right, the conversion worked.

You can also test by creating a simple formula. In an empty cell, type =SUM(A1:A10), replacing A1:A10 with your converted range. If the formula returns a number instead of zero or an error, your text numbers are now real numbers and will work in any calculation.

When text numbers won't convert

Sometimes a column that looks like numbers actually contains a mix of text and numbers, or the text includes spaces or special characters that Excel can't ignore. If Find and Replace or Paste Special don't work, select the cells and try the Text to Columns method from the Data tab — this is the most forgiving approach and handles mixed content better than other methods.

If Text to Columns still doesn't work, the cells probably contain actual text (like "twelve" spelled out) rather than the numerals 1, 2, 3. In that case, you'll need to retype or find a different source for the data, because Excel can't convert spelled-out words to numbers automatically.

Frequently Asked Questions

Why does Excel treat my numbers as text in the first place?

Excel defaults a column to text format if the first few cells it sees are text, or if you paste into a column that's already formatted as text. Data imported from databases or websites often arrives as text by default. Changing the column format to Number before pasting prevents this, but if it's already happened, the methods above will fix it.

Will converting text to numbers change the actual values?

No. Converting text numbers to real numbers keeps the values exactly the same — only the format changes. A text "42" becomes a number 42. If your numbers have decimals, they stay the same too.

Can I convert an entire column at once?

Yes. Click the column header to select the whole column, then use any of the methods above — Find and Replace, Paste Special, or Text to Columns. All three work on full columns, though Paste Special is usually fastest for large amounts of data.

What if I only want to convert some cells in a column, not all of them?

Select only the cells you need to convert by clicking the first one, then holding Ctrl (Windows) or Command (Mac) and clicking each additional cell. Then use Find and Replace or Paste Special on just those cells. Text to Columns also works on partial selections.

Do I need to save my file after converting?

Yes, save your file after converting to make sure the changes stick. Press Ctrl+S (Windows) or Command+S (Mac). If you're unsure whether the conversion worked, save to a test copy first so you can undo if needed.