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.

Chapter 20: Creating Megaformulas 557<br />

This example is for illustration only. The CUMIPMT function provides a more direct way<br />

to calculate total interest on a loan.<br />

The formula that calculates total interest depends on the formulas in cells C11 and C13 (which are<br />

the direct precedent cells). In addition, the formula in cell C13 depends on the formula in cell C12.<br />

And cell C12, in turn, depends on cell C11. Therefore, calculating the total interest uses five formulas.<br />

The steps that follow describe how to create a single formula to calculate total interest so<br />

that you can eliminate the four intermediate formulas. C14 contains the following formula:<br />

=C13–C11<br />

The steps that follow describe how to convert this formula into a megaformula:<br />

1. Substitute the formula contained in cell C13 for the reference to cell C13.<br />

Before doing this, add parentheses around the formula in C13. (Without the parentheses,<br />

the calculations occur in the wrong order.) Now the formula in C14 is<br />

=(C12*C6)–C11<br />

2. Substitute the formula contained in cell C12 for the reference to cell C12. Now the formula<br />

in C14 is<br />

=(PMT(C7/12,C6,–C11)*C6)–C11<br />

3. Substitute the formula contained in cell C11 for the two references to cell C11. Before<br />

copying the formula, you need to insert parentheses around it. Now the formula in C14 is<br />

=(PMT(C7/12,C6,–(C4–C10))*C6)–(C4–C10)<br />

4. Substitute the formula contained in cell C10 for the two references to cell C10. Before<br />

copying the formula, insert parentheses around it. After you’ve done so, the formula in<br />

C14 is<br />

=(PMT(C7/12,C6,–(C4–(C4*C5)))*C6)–(C4–(C4*C5))<br />

At this point, the formula contains references only to input cells. The formulas in range C10:C13<br />

are not referenced, so you can delete them. The single megaformula now does the work previously<br />

performed by the intermediary formulas.<br />

Unless you’re a world-class Excel formula wizard, it’s quite unlikely that you could arrive at that<br />

formula without first creating intermediate formulas.<br />

Creating a megaformula essentially involves substituting formula text for cell references in a formula.<br />

You perform substitutions until the megaformula contains no references to formula cells. At<br />

each step along the way, you can check your work by ensuring that the formula continues to display<br />

the same result. In the previous example, a few of the steps required parentheses around the<br />

copied formula in order to ensure the correct order of calculation.

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

Saved successfully!

Ooh no, something went wrong!