Fix Numbers Stored as Text: Why Your Totals Won’t Add Up

A column of numbers that refuses to total is almost always storing text, not numbers. The cells look right, but the spreadsheet treats each one as a label, so SUM skips it and the total comes out low. The fix takes a few minutes once you know what to look for, but the choice of method matters, because some fixes quietly corrupt data that should stay as text.

Why SUM ignores some of your numbers

SUM adds numbers and silently skips text. It does not warn you, and it does not return an error. A column containing 1,000 numbers and 3 text entries returns the total of the 1,000 numbers, which looks plausible until someone checks it against the source.

Text-stored numbers usually have two visible signs. They sit left-aligned in the cell, where numbers sit right-aligned by default, and Excel often shows a small green triangle in the top-left corner. Google Sheets shows no triangle, so the check there is alignment plus a formula test, covered in the diagnosis steps below.

Alignment is a clue, not proof. You can right-align text, and you can left-align numbers. Test the values with a formula.

Sorbet Books Bookkeeping Spreadsheet

Skip the setup

Sorbet Books Bookkeeping Spreadsheet

A friendly income and expense tracker with monthly totals and a profit summary that builds itself.

See it on Taskdale →

Why numbers end up as text

Text storage is rarely a deliberate choice. It usually comes from one of four sources.

Imports and exports

CSV files have no type information. Every value arrives as characters, and the spreadsheet guesses the type on import. Most guesses are correct, but the guess fails when a value contains a currency symbol, a thousands separator, a trailing space or a bracketed negative. Exports from accounting, banking and e-commerce systems often format values for display, which makes the export look like a number to a person and a string to software.

Database and API exports can also wrap every field in quotation marks. Some spreadsheet import dialogues then treat quoted fields as text by default.

Pasted and typed values

Copying from a web page, a PDF or an email brings formatting with it. Numbers copied from a web table often carry non-breaking spaces between the digits and the currency symbol. Typing a leading apostrophe (for example ‘1240) forces text on purpose, and it is sometimes left in place by someone who did not realise it was there.

Locale and punctuation

A file from a German or French system may use a comma as the decimal separator, so “1.240,50” means 1240.50. A UK spreadsheet reads that string as text or as a different number entirely. The same problem appears in reverse when a UK file is opened in a locale that expects commas as decimals.

Hidden characters

Trailing spaces, line breaks and zero-width characters survive import and block conversion. They are invisible in the cell, so the value looks clean and still refuses to convert.

How to diagnose the problem in five minutes

Work through these steps in order on a copy of the file. Do not start by converting anything.

  1. SOP 1.1: Select the column and read the status bar. In Excel, select the range and check whether Sum, Count and Average appear. If Sum shows but Count is lower than the number of populated cells, some values are text. In Google Sheets, select the range and compare the Sum shown with the count of cells you expect to be numeric.
  2. SOP 1.2: Test each cell type. In an empty helper column, enter =ISNUMBER(A2) and fill it down. FALSE marks a text value.
  3. SOP 1.3: Count the text entries. Use =SUMPRODUCT(–ISTEXT(A2:A500)) in Excel or the equivalent in Sheets. Adjust the range to your data.
  4. SOP 1.4: Inspect the length. Enter =LEN(A2) beside a suspect value. A value of “1240.50” should return 7. A result of 8 or 9 means hidden characters are present.
  5. SOP 1.5: Identify the characters. For a suspect cell, =CODE(MID(A2,n,1)) returns the code of the character at position n. Code 160 is a non-breaking space. Code 32 is a normal space.
  6. SOP 1.6: Record the findings. Note the count of text entries, the types of character found and the source system. This record tells you whether the problem will recur on the next import.

Choosing a fix

No single method suits every file. The right choice depends on how many values are affected, whether the data will be imported again, and whether the original text must be preserved.

MethodHandles currency symbolsHandles brackets for negativesHandles non-breaking spacesRepeats automatically on new importsChanges source data
Error indicator “Convert to Number” (Excel)NoNoNoNoYes, in place
Text to Columns, then FinishPartlyNoNoNoYes, in place
Paste Special, Multiply by 1Only if already cleanNoNoNoYes, in place
VALUE or double negative in a helper columnOnly with SUBSTITUTEOnly with extra logicOnly with SUBSTITUTEYes, if formula is copiedNo
NUMBERVALUE (Excel)Only with SUBSTITUTEOnly with extra logicOnly with SUBSTITUTEYes, if formula is copiedNo
Power Query type changeYes, with Currency typeYes, in most casesYes, with Replace ValuesYes, on refreshNo, keeps a query step

Decision rules

  • For a one-off clean-up of clean values, use Text to Columns or Paste Special. They are fast, but they change the source, so keep a backup.
  • For a messy column that you need to audit, use a helper column with VALUE and SUBSTITUTE. The original stays intact and every step is visible.
  • For a recurring import, use Power Query in Excel, or a documented formula column in Sheets. Manual fixes have to be repeated on each file, and people forget.
  • For a file with mixed locales, do not rely on automatic detection. Use NUMBERVALUE in Excel with explicit separators, or split the file by locale before conversion.

Fixing it: methods in detail

Method A: Convert to Number (Excel)

When a cell shows the green triangle, select the range, click the warning icon and choose Convert to Number. This clears the triangle and converts the values that were plain numbers in text form. It does not remove currency symbols or non-breaking spaces, so check the results with the diagnosis steps afterwards.

Method B: Text to Columns (Excel)

Select the column, go to Data, choose Text to Columns, pick Delimited, click Next, then Finish. Excel re-reads each value and converts it where it can. Set the column data format to General if the dialogue offers it. This method overwrites the column, so run it on a copy.

Method C: Paste Special, Multiply by 1

Enter 1 in an empty cell and copy it. Select the text range, choose Paste Special, pick Multiply and click OK. Each text value is coerced by the arithmetic. The method fails on values with currency symbols or commas, because the arithmetic cannot parse them. Clean those first.

Method D: Helper column with VALUE and SUBSTITUTE

This is the most controllable method and the one most people should learn. In a helper column beside raw data in column A, enter the following in B2 and fill down.

=IF(TRIM(A2)=””,””,IFERROR(VALUE(TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,CHAR(160),””),”£”,””),”,”,””))),”Check”))

What each part does:

  • The outer IF returns a blank for empty cells, so they are not flagged as errors.
  • SUBSTITUTE with CHAR(160) removes non-breaking spaces.
  • SUBSTITUTE with “£” removes the currency symbol.
  • SUBSTITUTE with “,” removes thousands separators.
  • TRIM removes any remaining leading or trailing spaces.
  • VALUE converts the cleaned text to a number.
  • IFERROR returns “Check” for anything that still cannot be parsed, so it can be reviewed by hand.

Add the bracket rule when the source uses brackets for negatives. The next worked example adds that step.

Method E: NUMBERVALUE (Excel)

NUMBERVALUE(text, decimal_separator, group_separator) converts text using the separators you specify, regardless of the machine’s locale. For a file that uses “1.240,50”, the formula NUMBERVALUE(A2, “,”, “.”) returns 1240.5. Use this when the file’s format is known and differs from your own settings. Clean currency symbols with SUBSTITUTE first, because NUMBERVALUE does not strip them.

Method F: Power Query (Excel)

Load the table into Power Query through Data, then From Table/Range. Select the column, choose Transform, then Data Type, and set it to Decimal Number or Currency. Use Replace Values to remove symbols, or Trim and Clean from the Transform menu to remove spaces and non-printing characters. When the source file changes, Refresh reapplies every step. Power Query also records each step, which gives you an audit trail. Set the locale on the type conversion if the file uses non-UK separators.

Method G: Google Sheets

Sheets does not have an error-triangle conversion. Use a helper column with VALUE and SUBSTITUTE, as in Method D, and use the Format menu to apply a number format to the output. For larger tasks, use Data, then Split text to columns to separate values that share a delimiter, then convert each part. Check the results with ISNUMBER, because Sheets will still display text values with the same alignment as Excel.

Lapis Ledger Annual Budget

Ready-made template

Lapis Ledger Annual Budget

Monthly and annual budget tabs for Excel and Google Sheets, with category totals that add themselves up.

See it on Taskdale →

Worked example: a payments column that totals £5,560.75

A payments export arrives as a CSV. The column holds seven rows, and the finance lead reports that the total should be about £5,500 but the sheet shows £3,250.75 with Sum. The raw values are below.

RowRaw value in column AWhat is wrong
2£1,240.50Currency symbol and thousands separator
3£980.00Trailing spaces
41,105.25Thousands separator only
5(£75.00)Bracketed negative
6£ 2,310.00Non-breaking space after the symbol
7(blank)Empty cell
8n/aNot a number

Step 1: Diagnose

Running =SUMPRODUCT(–ISTEXT(A2:A8)) returns 7, so every entry is text. Sum shows 3,250.75, which is the total of the values that happened to be stored as plain numbers, and it is not the correct total.

Step 2: Clean with a helper column that handles brackets

The bracket rule needs one more test. A negative in brackets should flip the sign, so the helper formula checks whether the first character is an opening bracket. In B2, enter the following and fill down to B8.

=IF(TRIM(A2)=””,””,IFERROR(VALUE(TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,CHAR(160),””),”£”,””),”,”,””),”(“,””),”)”,””)))*IF(LEFT(TRIM(A2),1)=”(“,-1,1),”Check”))

Step 3: Read the results

RowHelper result
21240.5
3980
41105.25
5-75
62310
7(blank)
8Check

Step 4: Reconcile

Sum of the helper column returns 5,560.75. That is 1,240.50 + 980.00 + 1,105.25 − 75.00 + 2,310.00. The “Check” entry in row 8 is excluded from the sum, and the review confirms that “n/a” is not an amount. Count of the helper column, using COUNT, should return 5. If it returns fewer, a row has failed silently and should be checked.

Step 5: Decide what to do with the original

The original column A should stay as received, for audit and for re-import. Use the helper column in reports, or paste values from column B into a new column if the downstream system needs a clean numeric column. Do not overwrite the raw export.

The gap between the two totals (£3,250.75 and £5,560.75) is £2,310.00, which is exactly the value in row 6. That row had a non-breaking space, which made the text unrecognisable to a plain Convert to Number and to Text to Columns in this file. The lesson is that a single hidden character can account for a large shortfall, so reconcile every fix against an independent total from the source system.

Common mistakes

Formatting a column as Number does not convert existing text. Changing the format changes how new entries are displayed. Existing text stays as text until it is re-entered or converted.

Using Find and Replace to delete currency symbols without checking the rest of the cell. Replacing “,” with nothing is safe for thousands separators in UK files, but it corrupts a file that uses commas as decimal separators, turning 1,50 into 150.

Trusting Convert to Number on the first click. It clears the triangle without necessarily converting every value. Run the ISNUMBER test again afterwards.

Converting identifiers. Account numbers, postcodes and product codes with leading zeros lose the zero when converted, so 01234 becomes 1234. These should stay as text, and the mistake is covered in the next section.

Overwriting raw data without a copy. Every in-place method changes the source. A recovery path costs nothing and saves a rebuild.

Using VALUE on a machine with a different locale. VALUE follows the locale of the spreadsheet, so a formula that works on a UK machine can return an error or a wrong number on a machine set to German. Use NUMBERVALUE with explicit separators when files cross locales.

Assuming a fixed total means a correct total. A total that matches expectations once is not proof. Reconcile against the source system’s control total or row count.

Keeping the fix in place on the next import

A one-time fix is not a process. The same export will arrive next month with the same problems, so the process should be written down and repeated.

  1. SOP 2.1: Set the import options. Where the import dialogue allows, set the affected columns to Text if they are identifiers, and to General or a number format if they are amounts.
  2. SOP 2.2: Run the diagnosis. Apply the ISTEXT count and the Count versus Sum check from the diagnosis steps to every amount column.
  3. SOP 2.3: Apply the helper column. Copy the cleaning formula from the template file, adjust the range and check that no “Check” values remain, or that each one is explained.
  4. SOP 2.4: Reconcile. Compare the helper total and the row count with the source control total. Record the result and the date.
  5. SOP 2.5: Archive the raw file. Keep the original export unchanged, with its name and date.
  6. SOP 2.6: Review the template. If a new symbol or format appears, add it to the SUBSTITUTE chain and note the change in the template’s change log.

For a recurring import, a Power Query model with a saved set of steps is more reliable than a manual sequence, because the steps run in the same order each time. For a workbook shared between people with different locales, add a locale note to the template header so the next person knows which separators the file expects.

When to stop and escalate

Stop before converting if the column mixes amounts with identifiers, if the source system’s control total does not match any version of the cleaned sum, or if the same values convert differently across two runs. Each of these points to a problem in the export, not in the spreadsheet, and the export should be corrected at source or confirmed with whoever produced it.

If you are unsure, convert a copy, reconcile it, and only then decide what to do with the original.

Claimbright Expense Report

Get the finished file

Claimbright Expense Report

Expense claims with categories, receipts log and reimbursement totals worked out automatically.

See it on Taskdale →

Scroll to Top