Microsoft Office Tutorials and References
In Depth Information
Rounding Numbers
In practice, INT and TRUNC return different results only when using negative numbers. For
example, the following formula returns –14.0:
=TRUNC(–14.2)
The next formula returns –15.0 because –14.3 is rounded down to the next lower integer:
=INT(–14.2)
The TRUNC function takes an additional (optional) argument that’s useful for truncating decimal
values. For example, the formula that follows returns 54.33 (the value truncated to two decimal
places):
=TRUNC(54.3333333,2)
Rounding to an even or odd integer
The ODD and EVEN functions are provided for situations in which you need to round a number
up to the nearest odd or even integer. These functions take a single argument and return an
integer value. The EVEN function rounds its argument up to the nearest even integer. The ODD
function rounds its argument up to the nearest odd integer. Table 10-2 shows some examples of
these functions.
Table 10-2: Results Using the EVEN and ODD Functions
Number
EVEN Function
ODD Function
–3.6
–4
–5
–3.0
–4
–3
–2.4
–4
–3
–1.8
–2
–3
–1.2
–2
–3
–0.6
–2
–1
0.0
0
1
0.6
2
1
1.2
2
3
1.8
2
3
2.4
4
3
3.0
4
3
3.6
4
5
 
Search JabSto ::




Custom Search