Sub topic 4
Formatting versus rounding
This chapter assumes you can enter data, write a basic formula such as =A1+B1, and apply a number format from the Ribbon or the Format Cells dialog. The previous chapters covered the difference between a stored value and its display. Here you will see what that difference does to your results.
Display rounding
A number format that shows fewer decimals rounds only what you see. The stored value keeps its full precision, and every formula reads the stored value.
Suppose A1 and A2 both contain 1.4, and both cells use the format 0.
| Cell | Stored value | Displayed |
|---|---|---|
| A1 | 1.4 | 1 |
| A2 | 1.4 | 1 |
| A3 (`=A1+A2`) | 2.8 | 3 |
The column appears to say 1 + 1 = 3. Nothing is wrong. Excel added 1.4 and 1.4, and the format rounded each result for display. Check this by selecting A1 and reading the formula bar, which shows the stored value.
0Rounding the stored value
ROUND changes the stored value itself. The second argument is the number of decimal places.
=ROUND(A1,2)If you apply =ROUND(A1,0) to both cells above, each becomes 1, and the total becomes 2. Negative digit counts round to the left of the decimal point, so =ROUND(1234,-2) returns 1200.
flowchart LRChoosing between them
| Approach | Changes the stored value | Affects other formulas |
|---|---|---|
| Number format (decimal buttons, Format Cells) | No | No |
| `ROUND` and related functions | Yes | Yes |
| Precision as displayed (Excel option) | Yes, permanently | Yes |
Use a number format when the full-precision value should stay available, as in most reports and models. Use ROUND when the rounded figure is the real figure. Invoices are the usual case, because a tax amount must be a whole number of cents and the lines must add up to the printed total.
Common errors
- Totals that look off by one cent or one unit. The cause is display rounding, so round the inputs with
ROUNDif the printed lines must sum exactly. - Comparisons that fail. A cell showing 0.30 may hold 0.30000000000000004 after arithmetic, so
=A1=0.3can return FALSE. Compare with=ROUND(A1,2)=0.3. - Rounding too early. Round once at the end of a calculation, not at every step, unless the business rule requires intermediate rounding.
Exercise
A1 holds 2.5 and A2 holds 2.5. Both cells use the format 0, and A3 contains =A1+A2. What do A1, A2, and A3 display, and what formula would make the three displayed values add up correctly?
Show answer
A1 and A2 each display 3 (2.5 rounds up for display), and A3 displays 5 because the stored sum is 5.0. The displayed values 3 + 3 would suggest 6. To make the display consistent, round the inputs, for example =ROUND(A1,0) and =ROUND(A2,0), so each stored value is 3 and the sum is 6.