18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Part II<br />

Working with Formulas and Functions<br />

FIGURE 18.4<br />

An array formula calculates the sum of the digits in an integer.<br />

Summing rounded values<br />

Figure 18.5 shows a simple worksheet that demonstrates a common spreadsheet problem: rounding errors.<br />

As you can see, the grand total in cell E7 appears to display an incorrect amount. (That is, it’s off by a<br />

penny.) The values in column E use a number format that displays two decimal places. The actual values,<br />

however, consist of additional decimal places that do not display due to rounding (as a result of the number<br />

format). The net effect of these rounding errors is a seemingly incorrect total. The total, which is actually<br />

$168.320997, displays as $168.32.<br />

FIGURE 18.5<br />

Using an array formula to correct rounding errors.<br />

The following array formula creates a new array that consists of values in column E, rounded to two decimal<br />

places:<br />

{=SUM(ROUND(E4:E6,2))}<br />

This formula returns $168.31.<br />

340

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!