Excel s Auditing Tools


Excel's Auditing Tools

Excel includes a number of tools that can help you track down formula errors. The following sections describe the auditing tools built into Excel.

Identifying Cells of a Particular Type

The Go To Special dialog box is a handy tool that enables you to locate cells of a particular type. To display this dialog box, choose Home image from book Editing image from book Find & Select image from book Go To Special, which displays the Go To Special dialog box, as shown in Figure 21-6.

image from book
Figure 21-6: The Go To Special dialog box.

Note 

If you select a multicell range before displaying the Go To Special dialog box, the command operates only within the selected cells. If a single cell is selected, the command operates on the entire worksheet.

You can use the Go To Special dialog box to select cells of a certain type, which can often help you identify errors. For example, if you choose the Formulas option, Excel selects all the cells that contain a formula. If you zoom the worksheet out to a small size, you can get a good idea of the worksheet's organization (see Figure 21-7).

image from book
Figure 21-7: Zooming out and selecting all formula cells can give you a good overview of how the worksheet is designed.

Tip 

Selecting the formula cells may also help you to spot a common error-a formula that has been replaced accidentally with a value. If you find a cell that's not selected amid a group of selected formula cells, chances are good that the cell previously contained a formula that has been replaced by a value.

Viewing Formulas

You can become familiar with an unfamiliar workbook by displaying the formulas rather than the results of the formulas. To toggle the display of formulas, choose Formulas image from book Formula Auditing image from book Show Formulas. You may want to create a second window for the workbook before issuing this command. This way, you can see the formulas in one window and the results of the formula in the other window. Choose View image from book Window image from book New Window to open a new window.

Tip 

You can also use Ctrl+` (the accent grave key, usually located above the Tab key) to toggle between Formula view and Normal view.

Figure 21-8 shows an example of a worksheet displayed in two windows. The window on the top shows Normal view (formula results), and the window on the bottom displays the formulas. The View image from book Window image from book View Side by Side command, which allows synchronized scrolling, is also useful for viewing two windows.

image from book
Figure 21-8: Displaying formulas (bottom window) and their results (top window).

image from book
Third-Party Auditing Tools

Several third-party auditing tools for Excel are available, including my Power Utility Pak. If you're interested in finding out about such tools, try searching the Web.

image from book

When Formula view is in effect, Excel highlights the cells that are used by the formula in the active cell. In Figure 21-7, for example, the active cell is C11. The cells used by this formula are highlighted in both windows.

Tracing Cell Relationships

To understand how to trace cell relationships, you need to familiarize yourself with the following two concepts:

  • Cell precedents: Applicable only to cells that contain a formula, a formula cell's precedents are all the cells that contribute to the formula's result. A direct precedent is a cell that you use directly in the formula. An indirect precedent is a cell that is not used directly in the formula but is instead used by a cell that you refer to in the formula.

  • Cell dependents: These are formula cells that depend on a particular cell. A cell's dependents consist of all formula cells that use the cell. Again, the formula cell can be a direct dependent or an indirect dependent.

Identifying cell precedents for a formula cell often sheds light on why the formula is not working correctly. Conversely, knowing which formula cells depend on a particular cell is also helpful. For example, if you're about to delete a formula, you may want to check whether it has any dependents.

IDENTIFYING PRECEDENTS

You can identify cells used by a formula in the active cell in a number of ways:

  • Press F2. The cells that are used directly by the formula are outlined in color, and the color corresponds to the cell reference in the formula. This technique is limited to identifying cells on the same sheet as the formula.

  • Display the Go To Special dialog box (choose Home image from book Editing image from book Find & Select image from book Go To Special). Select the Precedents option and then select either Direct Only (for direct precedents only) or All Levels (for direct and indirect precedents). Click OK, and Excel selects the precedent cells for the formula. This technique is limited to identifying cells on the same sheet as the formula.

  • Press Ctrl+[ to select all direct precedent cells on the active sheet.

  • Press Ctrl+Shift+{ to select all precedent cells (direct and indirect) on the active sheet.

  • Choose Formulas image from book Formula Auditing image from book Trace Precedents. Excel will draw arrows to indicate the cell's precedents. Click this button multiple times to see additional levels of precedents. Choose Formulas image from book Formula Auditing image from book Remove Arrows to hide the arrows. Figure 21-9 shows a worksheet with precedent arrows drawn to indicate the precedents for the formula in cell C13.

image from book
Figure 21-9: This worksheet displays lines that indicate cell precedents for the formula in cell C13.

IDENTIFYING DEPENDENTS

You can identify formula cells that use a particular cell in a number of ways:

  • Display the Go To Special dialog box. Select the Dependents option and then select either Direct Only (for direct dependents only) or All Levels (for direct and indirect dependents). Click OK. Excel selects the cells that depend on the active cell. This technique is limited to identifying cells on the active sheet only.

  • Press Ctrl+] to select all direct dependent cells on the active sheet.

  • Press Ctrl+Shift+] to select all dependent cells (direct and indirect) on the active sheet.

  • Choose Formulas image from book Formula Auditing image from book Trace Dependents. Excel will draw arrows to indicate the cell's dependents. Click this button multiple times to see additional levels of dependents. Choose Formulas image from book Formula Auditing image from book Remove Arrows to hide the arrows.

Tracing Error Values

If a formula displays an error value, Excel can help you identify the cell that is causing that error value. An error in one cell is often the result of an error in a precedent cell. Activate a cell that contains an error value and choose Formulas image from book Formula Auditing image from book Error Checking image from book Trace Error. Excel draws arrows to indicate the error source.

Fixing Circular Reference Errors

If you accidentally create a circular reference formula, Excel displays a warning message, displays Circular Reference (with the cell address) in the status bar, and draws arrows on the worksheet to help you identify the problem. If you can't figure out the source of the problem, use Formulas image from book Formula Auditing image from book Error Checking image from book Circular References. This command displays a list of all cells that are involved in the circular references. Start by selecting the first cell listed and then work your way down the list until you figure out the problem.

Using Background Error Checking

Some people may find it helpful to take advantage of Excel's automatic error-checking feature. This feature is enabled or disabled by using the check box labeled Enable Background Error Checking, in the Formulas tab in the Excel Options dialog box shown in Figure 21-10. In addition, you can specify which types of errors to check for by using the check boxes in the Error Checking Rules section.

image from book
Figure 21-10: Excel can check your formulas for potential errors.

When error checking is turned on, Excel continually evaluates your worksheet, including its formulas. If a potential error is identified, Excel places a small triangle in the upper-left corner of the cell. When the cell is activated, a Smart Tag appears. Clicking this Smart Tag provides you with options. Figure 21-11 shows the options that appear when you click the Smart Tag in a cell that contains a #DIV/0! error. The options vary, depending on the type of error.

image from book
Figure 21-11: Clicking an error Smart Tag gives you a list of options.

In many cases, you will choose to ignore an error by selecting the Ignore Error option. Selecting this option eliminates the cell from subsequent error checks. However, all previously ignored errors can be reset so that they appear again. (Use the Reset Ignored Errors button in the Formulas tab of the Excel Options dialog box.)

You can choose Formulas image from book Formula Auditing image from book Error Checking to display a dialog box that describes each potential error cell in sequence, much like using a spell-checking command. This command is available even if you disable background error checking. Figure 21-12 shows the Error Checking dialog box. Note that this dialog box is modeless, so you can still access your worksheet when the Error Checking dialog box is displayed.

image from book
Figure 21-12: Using the Error Checking dialog box to cycle through potential errors identified by Excel.

Caution 

It's important to understand that the error-checking feature is not perfect. In fact, it's not even close to perfect. In other words, you can't assume that you have an error-free worksheet simply because Excel does not identify any potential errors! Also, be aware that this error checking feature won't catch a very common type of error-that of overwriting a formula cell with a value.

Using Excel's Formula Evaluator

Excel's Formula Evaluator enables you to see the various parts of a nested formula evaluated in the order that the formula is calculated.

To use the Formula Evaluator, select the cell that contains the formula and choose Formula image from book Formula Auditing image from book Evaluate Formula to display the Evaluate Formula dialog box, as shown in Figure 21-13.

image from book
Figure 21-13: Excel's Formula Evaluator shows a formula being calculated one step at a time.

Click the Evaluate button to show the result of calculating the expressions within the formula. Each click of the button performs another calculation. This feature may seem a bit complicated at first, but if you spend some time working with it, you'll understand how it works and see the value.

Excel provides another way to evaluate a part of a formula:

  1. Select the cell that contains the formula.

  2. Press F2 to get into cell edit mode.

  3. Use your mouse to highlight the portion of the formula that you want to evaluate. Or, press Shift and use the arrow keys.

  4. Press F9.

The highlighted portion of the formula displays the calculated result. You can evaluate other parts of the formula or press Esc to cancel and return your formula to its previous state.

Caution 

Be careful when using this technique because if you press Enter (rather than Esc), the formula will be modified to use the calculated values.




Excel 2007 Formulas
Excel 2007 Formulas (Mr. Spreadsheets Bookshelf)
ISBN: 0470044020
EAN: 2147483647
Year: 2007
Pages: 212

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net