2001 Excel Design Audit Tips
2001 Excel Design Audit Tips
Spreadsheet models are a natural tool for managers but they can be hard to create from scratch and hard to understand and use if they're not well constructed. This short guide provides tips on how to create a well-designed worksheet and also discusses some auditing techniques. Specific references are to Excel 2000. -Paula Ecklund Spring 2001
Contents
Page I. Getting Started .................................................................................................... 1 Inputs Outputs Relationships II. Data Entry and Organization............................................................................... 2 Constant Values Row-Column Structure The Final Report Documentation III. Creating Formulas ............................................................................................... 6 Numbers in Formulas Reproducing Formulas Relative and Absolute Addressing Simple Formulas Range Names Intermediate Quantities Flow of Calculation IV. Auditing and Debugging Your Worksheet .......................................................... 9 See the Organization of a Large Worksheet View Detailed Information About Cells Use the Excel's Auditor to Correct Problems and Examine Cell Relationships V. For more Information........................................................................................ 11 Using Excel's Online Help
I. Getting Started
Before you begin building a worksheet, spend some time thinking about the data you're going to model and the problem you want to solve. Try to identify the inputs and outputs and the relationships among the data.
Inputs
Known Values Any known values or given data. These are quantities you don't control. Do you need any additional data to build the model? Decision Variables Quantities you control and can manipulate to optimize your model's solution. In some cases, decision variable values may be efficiently optimized by using tools like Excel's Solver.
Outputs
The Object What you're trying to solve, find, show, or optimize: the "bottom line". Any Constraints Limits to inputs or outputs, tradeoffs, conditions you must meet. Examples of constraints are budgetary limitations or limits to available resources.
Relationships
Relationships Between Variables Relationships between the known values and decision variables, expressed in formulas. Not all the relationships may at first be clear, especially in a complex problem. They may become more clear as you work through the development of your model. A Pattern Whether or not your problem fits into a "family" of problems for which you might employ a generic model structure. For example, problems dealing with resource allocation or scheduling have traditional formats you might want to adopt for your model.
Constant values
If possible, keep all constant values together in one area of the worksheet, clearly distinguished from decision variables and formulas. An important principle of good spreadsheet design is to keep just one copy of each constant value. That is, enter a constant value in only one location in the worksheet. Then if you use the value in another cell, use a cell reference that refers to the constant value's unique location. Example: You enter the constant value of 6% for sales tax in cell E5. When you write a formula in your worksheet that requires sales tax, reference E5 in the formula instead of "hard coding" in the 6% value. Do: =subtotal*E5 Don't: =subtotal*6% Better yet, assign cell E5 a name, like SalesTax. Then use that name in any formula you write. The formula in the example above would then read =subtotal*SalesTax.
Row-Column Structure
Are there existing row or column structures in the data that you can exploit in your model's layout? For example, the data for the worksheet below was available in a tabular format that translates directly into this useful model layout.
Documentation
General Documentation: In an obvious place in the worksheet include general information that describes what the model is for, where the data is from, who the output is going to, etc. Documenting Data: When entering data, use descriptive labels to document data items. Example:
Not only can you include labels as text in worksheet cells, you can also name cells or groups of cells (ranges) and use those names in place of row-column references. This can make your worksheet much easier to read and modify. Rules for naming a range: = A range name can be of any length but can't contain spaces, commas, or hyphens. = A name must start with an underscore or a letter and shouldn't look like a cell reference. Examples of valid range names: Cost.of.Goods _Old_Data LongName1234 OK1 Examples of invalid range names: Cost-of-Goods Old Data LongName 1 2 3 A1
Here are three methods for naming a range: Method One: Use Insert, Name, Create to create names for cells automatically based on their row or column headings. Select the range to name and issue the commands to get this dialog box and idicate where Excel should find the names to use.
Method Two: Use Insert, Name, Define to create a name for a range you specify. For example, if you select the range A1:B3 in the example at right and issue the Insert, Name, Define command, Excel presents a dialog box that assumes you want to name the entire range Jan. If this isnt what you want, you can change the current selection. Method Three: Use the name box on the Excel 5 formula bar. In the example here you might highlight A1:B2, then click in the part of the formula bar that now holds the cell reference A1 and type in a name for the range, like Constant_data.
Documenting a Single Cell: If you want to document a cell but don't want to display the documentation directly in a cell of the worksheet, use a comment. A comment is associated with a cell, but not part of it. To create a comment, select the cell in question and enter the commands Insert, Comment. Excel displays a small text box in which to enter the comment.
Select Tools, Options and then the View tab to see your options regarding how comments are displayed. You can choose to display no comments, the comment indicator only (a red triangle at the upper-right-hand corner of a cell with an associated comment), or both the indicator and its comment. If you have the first (no comments) option selected, you can still see what cells have comments associated with them by hitting F5 (which opens the Go To dialog), hitting the Special button, selecting Comments, and hitting OK. Exel selects every cell that has an associated comment. If you have the second (comment indicator only) option selected, Excel shows the text of the comment when you position the mouse pointer over the indicator. The Sheet tab on the Page Setup dialog lets you select how you want comments printed: Not at all, as displayed on the worksheet, or all together at the end.
Reproducing Formulas
You may often need to reproduce a formula in several places in a worksheet. In many cases, you can type in the formula one time and then copy it to the other locations, avoiding hard-to-detect typing errors. When copying formulas, be sure to understand how to use relative and absolute addressing, described below.
This view of the same worksheet shows the contents of the formula cells. You can see that for each copied formula, Excel adjusted the cell references to refer to the data in the correct row. However, there may be occasions when you want to override Excel's relative addressing default. In the example below, the formula in the Tax column makes use of the values in column D and the 5% value in cell B1.
This view of the spreadsheet shows how the formulas appear. In order to properly copy the formula in E4 to cells E5 and E6, absolute addressing must be specified in the master formula in cell E4 for the 5% tax figure.
An absolute cell reference is indicated by putting a dollar sign before the row and column reference. In this example worksheet, cell B1 holds the tax value. When the cell reference is entered as $B$1 in a formula it indicates an absolute references to that cell. As an absolute reference, the reference won't change when the formula containing the reference is copied. So when the master tax formula in cell E4 is copied down the column to cells E5 and E6, the reference to the tax rate remains correct, pointing to cell B1. Note, however, that the first cell references in the master tax formula (D4) is left relative. When it's copied in a formula, it becomes D5 and D6, which is also correct.
Simple Formulas
Keep formulas simple and straightforward. This makes them easier to read and to debug. If you need to exress complex relationships, create several formulas and use them like building blocks instead of constructing an overly long formula.
Range Names
Use range names instead of cell references to make formulas easy to understand. (See the discussion above on naming and applying ranges.) If you assign a name to a cell or a range after youve used that cell or range in a formula, use the Insert, Name, Apply commands to have Excel use the name in formulas place of a cell reference. If you want the name to be used in place of any reference to that cell anywhere it might appear in the worksheet, select a single cell before issuing the commands. If you want the name applied to only a particular range, select that range before issuing the commands. Example: Formula without range names applied: Formula with range names applied: =C10*A3 =Subtotal*Tax
Intermediate Quantities
Arrange your model to show intermediate quantities of interest, such as subtotals.
Flow of Calculation
Try to plan the arrangement of worksheet formulas and labels so the flow of calculations is obvious.
Or, click Tools, Customize to open the Customize dialog box like the one at left. Locate the entry for the Auditing toolbar and click the box to its left to toggle it on. More on using the Auditing Toolbar below.
= Cell Comments You may find it useful to add comments to a cell, to include some documentation about a value or formula directly in the worksheet. Add a comment by right-clicking the cell and selecting Insert Comment. A comment box displays that works like the standard text box. View a comment by pointing to the cell that has the comment attached. Comments can be printed, either where the comment appears on the worksheet or at the end of the worksheet. = Cell Formatting To see the formatting applied to a cell, click the cell, and then click Cells on the Format menu. You can review each tab in the Format Cells dialog box to see the formats applied to the cell. = Cell/Range Name If you need to know whether a name refers to a cell, click the cell. The Name box at the left end of the formula bar displays either the address of the cell, such as A1, or the name that refers to the cell.
10
If your Office Assistant is turned on, click the Help Button on the Standard Toolbar (or hit F1) to open it. Then click the Office Assistant cartoon character to open a space in which to type a question or term you want help with. Depending on the state of your spreadsheet when you invoke the Office Assistant, the Assistant may suggest some relevant help topics. If you dont want to see the Office Assistant in the workspace, rightclick and choose Hide. If you dont want to use the Office Assistant at all, right-click and choose Options to open the Office Assistant options dialog. Then toggle off the Use the Office Assistant option.
Tip: Right click the Office Assistant and choose Animate to see the Assistants repertoire of tricks.
11
While the Office Assistant can be amusing and sometimes helpful, Excel 2000 has a much-improved online help system thats worth getting to know. You can invoke it by turning off the Office Assistant and choosing the commands Help, Microsoft Excel Help.
12
Excels complete online help system displays in two windows: A navigation (subject) pane left and a topic (content) pane at right. The topic pane or both the topic and navigation panes can be open on top of the current worksheet, making it easy to follow online help instructions as you work.
Use the arrow icons at the upper left to control the display of the navigation pane. There are three entrances into online help: Contents, the Answer Wizard, or the Index. Underlined references in the topic pane are hyperlinks. Drag to expand the panes to whatever size suits you.
13