Microsoft Office Tutorials and References

In Depth Information

function rounds its argument up to the nearest even integer. The ODD function rounds its argument up to the

nearest odd integer. Table 10-3 shows some examples of these functions.

Table 10-3: 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

Rounding to n significant digits

In some cases, you may need to round a value to a particular number of significant digits. For example, you

might want to express the value 1,432,187 in terms of two significant digits: that is, as 1,400,000. The value

9,187,877 expressed in terms of three significant digits is 9,180,000.

If the value is a positive number with no decimal places, the following formula does the job. This formula

rounds the number in cell A1 to two significant digits. To round to a different number of significant digits, re-

place the 2 in this formula with a different number.

=ROUNDDOWN(A1,2-LEN(A1))

For non-integers and negative numbers, the solution gets a bit trickier. The formula that follows provides a more

general solution that rounds the value in cell A1 to the number of significant digits specified in cell A2. This

formula works for positive and negative integers and non-integers.