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 />

FIGURE 11.1<br />

Excel’s Formula AutoCorrect feature often suggests a correction to an erroneous formula.<br />

TIP<br />

Excel lends a hand in helping you match parentheses. When the insertion point moves over a<br />

parenthesis while you’re editing a cell, Excel momentarily bolds it — and does the same with<br />

its matching parenthesis.<br />

Using functions in your formulas<br />

Most formulas you create use worksheet functions. These functions enable you to greatly enhance the<br />

power of your formulas and perform calculations that are difficult (or even impossible) if you use only the<br />

operators discussed previously. For example, you can use the TAN function to calculate the tangent of an<br />

angle. You can’t do this calculation by using only the mathematical operators.<br />

Examples of formulas that use functions<br />

A worksheet function can simplify a formula significantly. To calculate the average of the values in 10 cells<br />

(A1:A10) without using a function, you’d have to construct a formula like this:<br />

=(A1+A2+A3+A4+A5+A6+A7+A8+A9+A10)/10<br />

Not very pretty, is it? Even worse, you would need to edit this formula if you added another cell to the<br />

range. Fortunately, you can replace this formula with a much simpler one that uses one of Excel’s built-in<br />

worksheet functions:<br />

=AVERAGE(A1:A10)<br />

The following formula demonstrates how using a function can enable you to perform calculations that<br />

would not be possible otherwise. If (for example) you need to determine the largest value in a range, a formula<br />

can’t tell you the answer without using a function. Here’s a simple formula that returns the largest<br />

value in the range A1:D100:<br />

=MAX(A1:D100)<br />

Functions also can sometimes eliminate manual editing. Assume that you have a worksheet that contains<br />

1,000 names in cells A1:A1000, and all names appear in all-capital letters. Your boss sees the listing and<br />

informs you that the names will be mail-merged with a form letter — so all uppercase is not acceptable; for<br />

example, JOHN F. SMITH must appear as John F. Smith. You could spend the next several hours reentering<br />

the list — or you could use a formula such as the following, which uses a function to convert the<br />

text in cell A1 to the proper case:<br />

=PROPER(A1)<br />

Enter this formula once in cell B1 and then copy it down to the next 999 rows. Then select B1:B1000 and<br />

use Home ➪ Clipboard ➪ Copy to copy the range. Next, with B1:B1000 still selected, use Home ➪<br />

Clipboard ➪ Paste Values to convert the formulas to values. Delete the original column, and you’ve just<br />

accomplished several hours of work in less than a minute.<br />

179

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

Saved successfully!

Ooh no, something went wrong!