Sub topic 17
Formatting pitfalls and how to avoid them
This chapter assumes you know that a number format changes how a value looks and not what the cell stores (see "Number formats change display, not values"). It also assumes you know how calculation mode works. Here we cover the cases where the display and the stored value disagree and a model gives a wrong answer without any error.
The core problem: display is not value
A cell shows what its number format tells it to show. Formulas, lookups, and sums read the stored value, never the display. When the two differ by more than you expect, a printed model looks wrong even though every formula is correct.
The usual causes are:
- Rounding in the display only.
- Numbers stored as text.
- Scaling formats that hide the true magnitude.
- Formats that hide a value entirely.
- The "Set precision as displayed" option, which changes stored values permanently.
Pitfall 1: Rounding that does not add up
Suppose three line items are stored as 10.4, 10.4, and 10.4. With a format of #,##0_);(#,##0);"-"_), each cell displays 10. The total is stored as 31.2 and displays 31. A reader adding the displayed values gets 30, so the printed page appears to contain an error.
| Cell | Stored value | Displayed (no decimals) |
|---|---|---|
| B2 | 10.4 | 10 |
| B3 | 10.4 | 10 |
| B4 | 10.4 | 10 |
| B5 (sum) | 31.2 | 31 |
The model is correct. The display is misleading. You have three options:
- Show one or more decimal places so the difference is smaller or invisible.
- Accept the difference and add a footnote such as "Figures may not sum due to rounding." This is standard practice in published financials.
- Round inside the formula with
ROUNDwhere the business logic requires rounded amounts, such as invoice lines or share counts.
Option 3 changes values, so use it deliberately and not to fix cosmetics. Rounding every intermediate calculation also compounds small errors across a long forecast.
Pitfall 2: Precision as displayed
Under File > Options > Advanced, in the section "When calculating this workbook," there is a checkbox called "Set precision as displayed." If you tick it, Excel permanently rounds every stored constant to what its format shows. Excel warns that data will permanently lose accuracy, and the change cannot be undone by unticking the box.
Avoid this setting in financial models. It is especially harmful when a model has scaling formats (see below), because the stored values can be cut to the displayed scale. If you need a rounded number, write ROUND in the formula where it belongs.
Pitfall 3: Numbers stored as text
A number that is stored as text is a string of characters. SUM ignores it, arithmetic with + may coerce it, and VLOOKUP or MATCH may fail to match it against a true number. Common causes:
- Data pasted from a PDF, a web page, or an accounting system export.
- A cell formatted as Text (the
@format) before a number was typed in. - A leading apostrophe or a trailing space.
- Minus signs placed after the number, such as
500-.
Signs of the problem:
- A green triangle in the corner of the cell with the error hint "Number Stored as Text."
- Left alignment of a value that should be right-aligned under General format.
- A
SUMthat is lower than the total you expected.
Changing the format to Number does not fix an existing text entry. The cell keeps its text content until you re-enter it. You can press F2 then Enter on the cell, or convert the whole range at once. Useful approaches:
- Select the range and use the warning icon menu, then "Convert to Number."
- Use Data > Text to Columns, choose Delimited, and click Finish with no delimiter chosen. This re-parses the column.
- Use a helper formula such as
=VALUE(TRIM(A2))and paste the results as values. - Multiply by 1 using Paste Special > Multiply with a blank cell containing 1.
To find text numbers in a model, use a check cell such as =SUMPRODUCT(--ISTEXT(B2:B100)). It counts text cells in the range. A nonzero result should be investigated.
Pitfall 4: Scaling formats hide the true value
The scaling format #,##0.0,,_);(#,##0.0,,);"-"_) divides the display by one million. A cell holding 12,345,678 shows 12.3. This is useful for presentation, but there are traps.
- A reader who clicks the cell sees 12345678 in the formula bar and may not understand why the grid shows 12.3.
- Someone typing 12.3 into a cell with this format enters the number 12.3, not 12.3 million. It will display as 0.0 and may be treated as zero.
- Mixing scaled and unscaled cells in one table makes totals look wrong.
- Labels must state the unit, for example "USD millions," or the numbers are ambiguous.
A safer habit is to keep all stored values in one base unit, apply the scaling format consistently to a whole block, and put the unit in the row or column header. Inputs are better entered in the true unit, or in a clearly labeled unit column.
Pitfall 5: Formats that hide values
Custom formats can make a cell appear empty or wrong:
- The format
;;;(three empty sections) hides every value. The cell looks blank but holds data, and it still feeds formulas. - The zero section
"-"shows a dash for exact zero, but a tiny nonzero value such as 0.0001 formatted with no decimals displays0, not a dash, because it is not exactly zero. A dash on one row and a0on the next row can look inconsistent. - White font on a white background hides content in a way a format cannot reveal.
The tiny-value case often comes from floating-point arithmetic. Two numbers that should cancel can leave a residue like 1.4E-14. A balance check using =A1-B1 may then show a failure although the difference is meaningless. Compare with a tolerance instead:
=IF(ABS(A1-B1)<0.001,0,1)Wrapping the difference in ROUND(A1-B1,3) also works.
Pitfall 6: Percentages and the entry trap
With a percentage format applied first, typing 5 into a cell stores 0.05 and shows 5%. If the cell was formatted as General or Number and you type 5, it stores 5 and later applying the percentage format shows 500%. Check the stored value when percentages look 100 times too large or too small. Also note that a cell formatted as 0.0% displays 0.05 as 5.0%, but a multiple format such as 0.0"x" on the same cell shows 0.1x, a different rounding of the same number.
Pitfall 7: Dates that are really text or serial numbers
Excel stores a date as a serial number, a count of days from a start date. A cell that shows 46112 has a date stored in it with a number format on it that is not a date format. Reapply mmm-yy or the format you want. If a date is left-aligned and filters do not group it, it is probably text. Convert it with DATEVALUE or Text to Columns, setting the column type to Date.
Pitfall 8: Formats that do not travel
Formatting is stored per cell. When you copy and paste, you carry the source format with you, which can overwrite a destination's format. When you fill a formula down, the format fills too. Practical rules:
- Use Paste Special > Values or Formulas when you want to keep the destination format.
- Use Paste Special > Formats, or the Format Painter, when you want only the format.
- Apply cell styles (see the chapter on styles and templates) so formats are changed from one place.
A diagnostic workflow
When a number looks wrong, work from the cheapest check to the most expensive.
Two shortcuts help here. Press Ctrl+` to show formulas across the sheet, and press F2 on a single cell to see its real content. To reveal stored values in bulk, copy the range to a scratch area and set the format to General. Delete the scratch copy afterward.
Checklist before you send a model
- Is "Set precision as displayed" off?
- Does every scaled block have a unit label?
- Does
SUMPRODUCT(--ISTEXT(range))return 0 on each data block? - Do check cells use a tolerance and not an exact comparison?
- Do any cells use
;;;or other hiding formats unintentionally? - Do totals that look off by one agree with the stored values once you widen the decimals?
Exercise
A cell holds 0.0000000000001 (1E-13) after a subtraction that should have given zero. It uses the format #,##0);(#,##0);"-") and shows 0 instead of a dash. Why does the dash not appear, and how would you make a balance check robust against this?
Show answer
The format shows the dash only when the stored value is exactly zero. The value 1E-13 is positive, so the first section applies and rounds the display to 0. The cause is floating-point residue. Make the check robust by rounding or using a tolerance, for example =ROUND(A1-B1,3) or =IF(ABS(A1-B1)<0.001,0,1), so that an immaterial residue counts as zero.
Exercise
A column of revenue figures pasted from a PDF sums to less than expected, the cells are left-aligned, and changing the format to Number did nothing. What is wrong, and name two ways to fix it?
Show answer
The values are stored as text, and changing the format does not change existing text content. Fix it with the warning icon's "Convert to Number," with Data > Text to Columns and Finish, with a helper formula such as =VALUE(TRIM(A2)) pasted as values, or with Paste Special > Multiply by a cell containing 1.
Exercise
Why is it risky to enable "Set precision as displayed" in a model that uses the format #,##0.0,,?
Show answer
The option permanently rounds stored constants to what the format displays. With a millions scaling format, the display is a scaled version of the value, so stored data can lose precision, and the change cannot be reversed by unticking the box. Use ROUND in specific formulas instead.