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 16: Intentional Circular References 419<br />

A reader of the first edition of this book pointed out another way to approach this<br />

problem without using a circular reference. Use the following formula to calculate the<br />

Net_Profit cell:<br />

=(Gross_Income-Expenses)/(1+Pct)<br />

Then calculate the Contributions cell using this formula:<br />

=Pct*Net_Profit<br />

You can access the workbook, net profit (circular).xlsm, shown in Figure 16-4,<br />

on the companion CD-ROM. For your convenience, the worksheet includes a button<br />

that, when clicked, executes a macro that displays a dialog box that lets you toggle the<br />

iteration setting. This makes it easy to experiment with various iteration settings.<br />

Depending on your security settings, you may see a Security Warning when you open<br />

this workbook. In addition, the CD-ROM contains a file that demonstrates how to perform<br />

this calculation without using a circular reference, named net profit (not<br />

circular).xlsx.<br />

The <strong>Formula</strong> tab of the Excel Options dialog box includes three controls relevant to circular<br />

references:<br />

Enable Iterative Calculation check box: If unchecked, Excel does not perform iterative<br />

calculations, and Excel displays a warning dialog box if you create a formula that has a<br />

circular reference. By default, this box is unchecked. When creating an intentional circular<br />

reference, you must check this check box.<br />

Maximum Iterations: Determines the maximum number of iterations that Excel will perform.<br />

This value cannot exceed 32,767 and cannot be less than 1.<br />

Maximum Change: Determines when iteration stops. For example, if this setting is .01,<br />

iteration stops when a calculation produces a result that differs by less than 1 percent of<br />

the previous value.<br />

Calculation continues until Excel reaches the number of iterations specified in the<br />

Maximum Iterations box, or until a recalculation changes all cells by less than the<br />

amount you set in the Maximum Change box (whichever is reached first). Depending on<br />

your application, you may need to adjust the settings in the Maximum Iterations field or<br />

the Maximum Change field. For a more accurate solution, make the Maximum Change<br />

field smaller. If the result doesn’t converge after 100 iterations, you can increase the<br />

Maximum Iterations field.

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

Saved successfully!

Ooh no, something went wrong!