Sub topic 1
Stored Value Versus Displayed Format
Prerequisites
This chapter assumes you can enter and edit data in worksheet cells, write a basic formula such as =A1+B1, and select ranges and use the Ribbon. It does not assume you have used number formats before.
Two things in every cell
Every cell that holds a number has two separate parts:
- The stored value is the number Excel keeps and uses in calculations.
- The displayed format is a set of rules that decides how Excel shows that number on screen and in print.
Changing the format changes only the display. The stored value stays the same. Dates and times follow the same rule. Excel stores them as numbers and uses a format to draw them as dates or times.
Seeing the difference
Type 3.14159 in cell A1. Then format A1 to show two decimal places. The cell shows 3.14. Select the cell and look at the formula bar. It still shows 3.14159. The formula bar shows the stored value, so it is the quickest way to check what a cell really holds.
Now enter =A1*2 in B1. The result is 6.28318, not 6.28. Formulas always use the stored value.
The same idea applies to a date. Enter =DATE(2024,1,1) in a cell. Excel stores the serial number 45292. If the cell has a date format, you see a date. If the cell has the General format, you see 45292. The value is the same in both cases.
=DATE(2024,1,1)Why this matters
Formats are safe to change because they never alter your data. That also creates a risk. A cell can look like one number and hold another.
| Stored value | Format | Displayed |
|---|---|---|
| 42 | `00000` | 00042 |
| 0.256 | `0.0%` | 25.6% |
| 45292 | `yyyy-mm-dd` | 2024-01-01 |
| 1234.5678 | `0.00` | 1234.57 |
Suppose three cells hold 1.004, 1.004, and 1.004, and a format shows two decimals. Each cell displays 1.00, yet their sum is 3.012, which displays as 3.01. A reader adding the displayed numbers by hand gets 3.00. Chapter on rounding covers this in more detail, including how to change the stored value itself.
=ROUND(A1,2)Unlike a format, ROUND replaces the result with a value that has two decimal places.
Common errors
- Treating the displayed number as the real one. Copying a displayed
3.14into a report by hand loses the digits that calculations still use. - Assuming a format fixes data. Formatting a text entry as a number does not turn it into a number. Text-to-number conversion is covered in a later chapter.
- Expecting a date format to change a number's meaning. Applying a date format to
5shows a date in January 1900. The value is still 5.
Exercise
Cell A1 holds 2.456 and is formatted to show one decimal place, so it displays 2.5. What does =A1*10 return, and why?
Show answer
It returns 24.56. Formulas use the stored value 2.456, not the displayed 2.5. The format changes only how A1 looks.
Exercise
A cell displays 45292 and you want it to show as a date without changing its value. What do you change?
Show answer
Change the cell's number format to a date format. The stored serial number stays 45292, and the format displays it as 1/1/2024 or another date style.