Académique Documents
Professionnel Documents
Culture Documents
The following sections provide examples of formulas that use various types of rounding.
=ROUND(123.37,1)
If the second argument for the ROUND function is zero, the value is rounded to the nearest inte-
ger. The formula that follows, for example, returns 123.00:
=ROUND(123.37,0)
The second argument for the ROUND function can also be negative. In such a case, the number is
rounded to the left of the decimal point. The following formula, for example, returns 120.00:
=ROUND(123.37,–1)
The ROUND function rounds either up or down. But how does it handle a number such as 12.5,
rounded to no decimal places? You’ll find that the ROUND function rounds such numbers away
from zero. The formula that follows, for instance, returns 13.0:
=ROUND(12.5,0)
The next formula returns –13.00 (the rounding occurs away from zero):
=ROUND(–12.5,0)
To force rounding to occur in a particular direction, use the ROUNDUP or ROUNDDOWN func-
tions. The following formula, for example, returns 12.0. The value rounds down.
=ROUNDDOWN(12.5,0)
The formula that follows returns 13.0. The value rounds up to the nearest whole value.
=ROUNDUP(12.43,0)
=MROUND(133,5)
The following formula assumes a dollar and cents value is in cell A1. The formula rounds the value
to the nearest penny. For example, if cell A1 contains $12.421, the formula returns $12.42.
=ROUND(A1,2)
If you need to round the value up to the nearest penny, use the CEILING function. The following
formula rounds the value in cell A1 up to the nearest penny. For example, if cell A1 contains
$12.421, the formula returns $12.43.
=CEILING(A1,0.01)
To round a dollar value down, use the FLOOR function. The following formula, for example,
rounds the dollar value in cell A1 down to the nearest penny. If cell A1 contains $12.421, the for-
mula returns $12.42.
=FLOOR(A1,0.01)
=CEILING(A1,0.05)
You’ve probably noticed that many retail prices end in $0.99. If you have an even dollar price and
you want it to end in $0.99, just subtract .01 from the price. Some higher-ticket items are always
priced to end with $9.99. To round a price to the nearest $9.99, first round it to the nearest
$10.00 and then subtract a penny. If cell A1 contains a price, use a formula like this to convert it
to a price that ends in $9.99:
=ROUND(A1/10,0)*10–0.01
=MROUND(A1,10)–0.01
=DOLLARFR(9.25,4)
In most situations, you won’t use the value returned by the DOLLARFR function in other
calculations. In the preceding example, the result of the function will be interpreted as
9.1, not 9.25. To perform calculations on such a value, you need to convert it back to a
decimal value by using the DOLLARDE function.
The DOLLARDE function converts a dollar value expressed as a fraction to a decimal amount. It
also uses a second argument to specify the denominator of the fractional part. The following for-
mula, for example, returns 9.25:
=DOLLARDE(9.1,4)
The DOLLARDE and DOLLARFR functions aren’t limited to dollar values. For example,
you can use these functions to work with feet and inches. You might have a value that
represents 8.5 feet. Use the following formula to express this value in terms of feet and
inches. The formula returns 8.06 (which represents 8 feet, 6 inches).
=DOLLARFR(8.5,12)
Another example is baseball statistics. A pitcher may work 62⁄3 innings, and this is usu-
ally represented as 6.2. The following formula displays 6.2:
=DOLLARFR(6+2/3,3)
In practice, INT and TRUNC return different results only when using negative numbers. For exam-
ple, 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)