11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

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

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

50<br />

Part I: Basic Information<br />

Don’t hard-code values<br />

When you create a formula, think twice before using a literal value in the formula. For example,<br />

if your formula calculates a 7.5 percent sales tax, you may be tempted to enter a formula such as<br />

=A1*.075<br />

A better approach is to insert the sales tax rate into a cell and use the cell reference in place of<br />

the literal value. This makes it easier to modify and maintain your worksheet. For example, if the<br />

sales tax range changes to 7.75 percent, you need to modify every formula that uses the old<br />

value. If the tax rate is stored in a cell, you simply change one cell and all the formulas recalculate<br />

using the new value.<br />

Simply accepting the correction proposed in the dialog box is tempting, but be careful.<br />

In many cases, the proposed formula, although syntactically correct, isn’t the formula<br />

that you want. In the following example, I omitted the closing parenthesis after<br />

January. In Figure 2-2, Excel proposed this correction:<br />

=SUM(January/SUM(Total))<br />

In fact, the correct formula is<br />

=SUM(January)/SUM(Total)<br />

Figure 2-2: Excel’s <strong>Formula</strong> AutoCorrect feature often suggests a correction to an erroneous formula.<br />

Calculating <strong>Formula</strong>s<br />

You’ve probably noticed that the formulas in your worksheet get calculated immediately. If you<br />

change any cells that the formula uses, the formula displays a new result with no effort on your<br />

part. This occurs when Excel’s Calculation mode is set to Automatic. In this mode (the default<br />

mode), Excel follows certain rules when calculating your worksheet:<br />

When you make a change (enter or edit data or formulas, for example), Excel calculates<br />

immediately those formulas that depend on new or edited data.

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

Saved successfully!

Ooh no, something went wrong!