Page 195 - Excel 2007 Bible
P. 195

13_044039 ch09.qxp  11/21/06  12:23 PM  Page 152
                                    Part I
                                              Getting Started with Excel
                                             Creating a workbook template can eliminate repeating work. Assume that you create a monthly sales report
                                             that consists of your company’s sales by region, plus several summary calculations and charts. You can cre-
                                             ate a template file that consists of everything except the input values. Then, when it’s time to create your
                                             report, you can open a workbook based on the template, fill in the blanks, and be finished.
                                          NOTE
                                           NOTE
                                                       name. This is prone to errors, however, because you easily can forget to use the Save As com-
                                             mand and accidentally overwrite the previous month’s file. Another option is to use the New From Existing
                                             option in the New Workbook dialog box. This command creates a new workbook from an existing one, but
                                             gives a different name to ensure that the old file is not overwritten,
                                             When you create a workbook that’s based on a template, the default workbook name is the template name
                                             with a number appended. For example, if you create a new workbook based on a template named Sales
                                             Report.xltx, the workbook’s default name is Sales Report1.xlsx. The first time that you save a
                                             workbook that is created from a template, Excel displays its Save As dialog box so that you can give the
                                             template a new name if you want to.
                                             A custom template is essentially a normal workbook, and it can use any Excel feature, such as charts, formu-
                                             las, and macros. Usually, a template is set up so that the user can enter values and get immediate results. In
                                             other words, most templates include everything but the data, which is entered by the user.
                                                       If your template contains macros, it must be saved as an Excel Macro-Enabled Template, with
                                          NOTE         You could, of course, just use the previous month’s workbook and save it with a different
                                           NOTE
                                                       an XLTM extension.
                                             Saving your custom templates
                                             To save a workbook as a template, choose Office ➪ Save As and select Template (*.xltx) from the drop-
                                             down list labeled Save As Type. If the workbook contains any VBA macros, select Excel Macro-Enabled
                                                      Locking Formula Cells in a Template File
                                          f novices will use the template, you might consider locking all the formula cells to make sure that the formu-
                                         Ilas aren’t deleted or modified.
                                             1. Press F5 to display the Go To dialog box.
                                             2. Click the Special button to display the Go To Special dialog box.
                                             3. Select Constants and click OK. This step selects all of the nonformula cells.
                                             4. Right-click any one of the selected cells and choose Format Cells from the shortcut menu. The
                                                Format Cells dialog box appears.
                                             5. In the Format Cells dialog box, click the Protection tab.
                                             6. Remove the check mark from the Locked check box.
                                             7. Click OK to close the Format Cells dialog box.
                                             8. Choose Review ➪ Changes ➪ Protect Sheet to display the Protect Sheet dialog box.
                                             9. Specify a password if you like and click OK.
                                         After you perform these steps, you can’t modify the formula cells — unless the sheet is unprotected.
                                      152
   190   191   192   193   194   195   196   197   198   199   200