Microsoft Office Tutorials and References

In Depth Information

This formula returns
9.2
(interpreted as “nine and two-eighths”):

=DOLLARFR(9.25,8)

In most situations, you won't use the value returned by the DOLLARFR function in oth-

er calculations. 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 formula, for example, returns

9.25:

=DOLLARDE(9.1,4)

This workbook is available at this book's website. The filename is feet and inches.xlsx.

Using the INT and TRUNC functions

On the surface, the INT and TRUNC functions seem similar. Both convert a value to an integer. The TRUNC

function simply removes the fractional part of a number. The INT function rounds a number down to the nearest

integer, based on the value of the fractional part of the number.

In practice, INT and TRUNC return different results only when using negative numbers. For example, the fol-

lowing 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