Sub topic 6
What Is Stored Versus What Is Shown
This chapter assumes you can open a workbook, select a cell, type an entry, and commit it with Enter. It also assumes you know that Excel sorts entries into text, numbers, dates, and formulas.
Two values in every cell
Every cell holds a stored value and shows a displayed value. The stored value is what Excel keeps and uses in calculations. The displayed value is what you see in the cell after the number format, column width, and other settings are applied.
For a plain number, the two usually match. They stop matching when formatting rounds, reshapes, or hides part of the stored value. The formula bar shows the stored contents of the active cell. The cell shows the displayed result.
A rounding example
Type 3.14159 into A1 and press Enter. Select A1, then use the Decrease Decimal button on the Home tab until the cell shows 3.14. Click A1 again and look at the formula bar. It still shows 3.14159.
Now type this into B1:
=A1*2B1 uses the stored value, so it returns 6.28318 before any formatting. If B1 shows 6.28, that is formatting too. Calculations never use the rounded display.
Rounding can look like an error. If three cells show 0.33 and a total shows 1.00, the total is probably correct. It adds the stored values, and each of them has more digits than the display shows.
Dates are stored as numbers
Excel stores a date as a serial number, which counts days from a starting point. A time is the fractional part of a day. For example, 12:00 noon is stored as 0.5.
Type a date into A2, then apply the General number format from the Home tab. The cell now shows a number such as 46353. Nothing was lost. Only the display changed. Because dates are numbers, you can subtract one from another to get a number of days.
Why the display can mislead
The display and the stored value can also differ in these cases:
- A column that is too narrow shows
#####for a number or date. The stored value is intact. Widen the column to see it. - A long number may appear in scientific notation, such as
1.23E+15, when the General format cannot fit it. - Excel keeps only 15 significant digits of a number. Digits after the 15th are stored as zeros.
- Text that looks like a number, such as
'00123, is stored as text. It is left-aligned by default, and a number formatted to look the same would not be.
Checking the stored value
Use these checks when a cell looks wrong:
- Select the cell and read the formula bar.
- Apply the General format to see the raw number behind a date or time.
- Compare alignment. Numbers and dates align right by default, and text aligns left.
- Widen the column if you see
#####.
Exercise
A1 contains 2.567 and is formatted to show one decimal place, so it displays 2.6. In B1 you enter =A1*10. What does B1 return, and why?
Show answer
B1 returns 25.67. Formulas use the stored value 2.567, not the displayed 2.6. Using the display would give 26.
Exercise
You type a date into a cell and it later shows 46353. What happened, and how do you fix it?
Show answer
The cell's format changed to General or Number, so it shows the date's serial number. The stored value is still correct. Apply a Date format from the Home tab to see the date again.