Sub topic 17
Troubleshooting Common Format Problems
This chapter assumes you know that Excel stores a value separately from its display format. It also assumes you can open Format Cells, and that you have met date serial numbers, custom format codes, and the TEXT function. Most format problems come from a mismatch between what a cell contains and what you expect it to contain. The fix is to find the mismatch first and then change the stored value, the format, or both.
Diagnose before you fix
Applying formats at random often makes things worse. Run these three checks first:
- Look at the alignment. Numbers and dates align right by default, and text aligns left. This is only a hint, because alignment can be set by hand.
- Select the cell and read the formula bar. It shows the stored value, not the display.
- Test the cell with a formula.
=ISNUMBER(A1)TRUE means Excel treats the content as a number or date. FALSE means it is text, whatever it looks like. To find hidden characters, compare the visible length with the actual length.
=LEN(A1)If LEN returns more characters than you can see, the cell has extra spaces or invisible characters.
Cells that show ####
Hash marks appear only for numbers, dates, and times. They never replace text. There are two common causes.
- The column is too narrow. Double-click the right edge of the column header to autofit it. You can also reduce decimals or turn on Shrink to fit in Format Cells.
- The value is a negative date or time. Under the default 1900 date system, a serial number below 0 cannot be shown as a date or time. This usually happens when you subtract in the wrong order, such as
=A1-B1where B1 is later. Reverse the subtraction, or wrap it inABSif the sign does not matter.
Numbers stored as text
The symptoms are left alignment, a green triangle in the corner, a SUM that skips the cell, and ISNUMBER returning FALSE. Switching the format to General does not fix it. The format changes, but the content is still text until Excel re-reads it.
Use one of these fixes:
- Select the column, then choose Data > Text to Columns > Finish. This makes Excel re-parse every cell.
- Click the green triangle and choose Convert to Number.
- Type 1 in a spare cell, copy it, select the text cells, and use Paste Special > Multiply.
- Use a formula in a helper column.
=VALUE(SUBSTITUTE(TRIM(A1),CHAR(160),""))Data copied from web pages and PDFs often contains non-breaking spaces, which are character 160. TRIM does not remove them, so SUBSTITUTE is needed.
A related problem is a formula that displays as text, such as =A1+B1 showing literally. The cell was formatted as Text before you typed the formula. Change the format to General, then press F2 and Enter to re-enter it.
Dates stored as text, and day-month swaps
A date stored as text is left-aligned and cannot be used in date arithmetic. For text in ISO order, DATEVALUE is reliable.
=DATEVALUE("2026-11-27")For text with a fixed layout, build the date from its parts. This avoids any dependence on regional settings.
=DATE(LEFT(A1,4),MID(A1,6,2),RIGHT(A1,2))Apply a date format to the result if Excel shows a plain serial number instead.
Day-month swaps are harder, because the stored value itself is wrong. If your system uses month/day order and you type or import 03/04/2026, Excel stores 4 March even if the source meant 3 April. A date format cannot repair this, because the serial number is already different. Re-import the data through Text to Columns, and on step 3 choose Date with the DMY order. If the text can be parsed, use DATE with MID as shown above.
Totals that look wrong: display versus value
A column of values formatted to two decimals can sum to a figure that differs by a cent from adding the displayed numbers by hand. The cells hold more decimals than they show, and SUM uses the stored values. To make the stored values match the display, round them in the formula.
=ROUND(A1,2)The option File > Options > Advanced > Set precision as displayed does the same thing across the whole workbook. It permanently discards the extra digits, and you cannot undo it after saving. Prefer ROUND in specific formulas.
Long numbers, leading zeros, and scientific notation
Excel keeps only 15 significant digits. If you type or paste a 16-digit card or account number into a numeric cell, every digit after the 15th becomes 0, and the original is gone. Long numbers also display as 1.23457E+15 in a narrow General cell.
For identifiers, the cell must be text before the data goes in:
- Format the cells as Text, then enter the data.
- Import CSV files with Data > From Text/CSV, and set the column type to Text. Double-clicking a CSV file opens it with automatic conversion, which strips leading zeros and can turn codes like
1-2into dates. - If the value is a true number that only needs padding, keep it numeric and use a custom format such as
00000.
Applying the Text format to cells that already hold numbers does not restore lost zeros. It only affects values entered afterward, and you must re-enter the existing ones.
Date system mismatch
If dates shift by 1,462 days (four years and one day) after you copy between workbooks, the two files use different date systems. One uses 1900 and the other uses 1904. Check File > Options > Advanced > Use 1904 date system in both files. Make them match, or correct the pasted dates by adding or subtracting 1462.
Elapsed time and TEXT results
If a total of 30 hours displays as 6:15 (or similar), the format uses h:mm, which wraps at 24 hours. Use the bracketed form.
[h]:mmResults from TEXT are always text. They align left, SUM ignores them, and further arithmetic on them can fail. Keep the numeric cell for calculation and use TEXT only in the label that you display. The format codes inside TEXT also depend on the language of the Excel installation. A workbook with "yyyy-mm-dd" can show wrong results or errors when opened in a German installation, which expects JJJJ-MM-TT.
Quick reference
| Symptom | Likely cause | Fix |
|---|---|---|
| `####` in a number cell | Column too narrow | Autofit the column |
| `####` in a date or time cell | Negative result | Correct the subtraction order |
| Left-aligned number, `SUM` skips it | Number stored as text | Text to Columns, Paste Special, or `VALUE` |
| `TRIM` does not clean the value | Non-breaking space | `SUBSTITUTE` with `CHAR(160)` |
| Date reads 4 March instead of 3 April | Wrong parse order on import | Re-import with the DMY setting |
| Total is a cent off | Stored decimals hidden by format | `ROUND` in the formula |
| Trailing digits became 0 | 15-digit limit | Import as Text |
| Dates off by 1,462 days | 1900 and 1904 systems mixed | Match the date system |
Exercise
Cell A1 shows 00123 and is left-aligned. =A1+1 returns 124, but =SUM(A1:A5) leaves A1 out of the total. You expected A1 to be a number. What is happening, and how can you check it?
Show answer
Check =ISNUMBER(A1) to see which case applies. The two results are mutually exclusive. If it returns FALSE, A1 is text. Entering =A1+1 works because arithmetic operators convert text such as "00123" to a number automatically, while SUM ignores text cells in a range. Convert the cell with Text to Columns or VALUE. If the leading zeros matter, keep a text copy and use the converted number only for calculation.
Exercise
A colleague opens a CSV file by double-clicking it. The ID 0042 becomes 42, and the 17-digit order code 12345678901234567 becomes 12345678901234500. Can formatting the cells as Text restore the original values, and what is the correct approach?
Show answer
No. Both changes happened when Excel parsed the file, so the original characters are gone. Applying the Text format afterward only affects values entered later. Re-import the file through Data > From Text/CSV, or the import wizard, and set the ID and order-code columns to Text before loading.