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.

Introducing Formulas and Functions 11<br />

This formula will always return the sum of all the data, even if rows or columns are added or deleted. And if<br />

you change the name of Table1, Excel will adjust formulas that refer to that table automatically. For example,<br />

if you renamed Table1 to be AnnualData (by using the Name Manager), the preceding formula<br />

would be changed to:<br />

=SUM(AnnualData)<br />

Most of the time, you’ll want to refer to a specific column in the table. The following formula returns the<br />

sum of the data in the Actual column:<br />

=SUM(Table1[Actual])<br />

Notice that the column name is enclosed in square brackets. Again, the formula adjusts automatically if you<br />

change the text in the column heading.<br />

Even better, Excel provides some helpful assistance when you create a formula that refers to data within a<br />

table. Figure 11.13 shows the formula autocomplete helping to create a formula by showing a list of the<br />

elements in the table.<br />

FIGURE 11.13<br />

The formula autocomplete feature is useful when creating a formula that refers to data in a table.<br />

Correcting Common Formula Errors<br />

Sometimes, when you enter a formula, Excel displays a value that begins with a hash mark (#). This is a signal<br />

that the formula is returning an error value. You have to correct the formula (or correct a cell that the<br />

formula references) to get rid of the error display.<br />

TIP<br />

the cell.<br />

If the entire cell is filled with hash-mark characters, this means that the column isn’t wide<br />

enough to display the value. You can either widen the column or change the number format of<br />

In some cases, Excel won’t even let you enter an erroneous formula. For example, the following formula is<br />

missing the closing parenthesis:<br />

=A1*(B1+C2<br />

If you attempt to enter this formula, Excel informs you that you have unmatched parentheses, and it proposes<br />

a correction. Often, the proposed correction is accurate, but you can’t count on it.<br />

Table 11.3 lists the types of error values that may appear in a cell that has a formula. Formulas may return<br />

an error value if a cell to which they refer has an error value. This is known as the ripple effect — a single<br />

error value can make its way into lots of other cells that contain formulas that depend on that one cell.<br />

195

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

Saved successfully!

Ooh no, something went wrong!