Page 233 - Excel 2007 Bible
P. 233

16_044039 ch11.qxp  11/21/06  11:04 AM  Page 190
                                   Part II
                                              Working with Formulas and Functions
                                             Changing the types of your references
                                             You can enter nonrelative references (that is, absolute or mixed) manually by inserting dollar signs in the
                                             appropriate positions of the cell address. Or you can use a handy shortcut: the F4 key. When you’ve entered
                                             a cell reference (by typing it or by pointing), you can press F4 repeatedly to have Excel cycle through all
                                             four reference types.
                                             For example, if you enter =A1 to start a formula, pressing F4 converts the cell reference to =$A$1. Pressing
                                             F4 again converts it to =A$1. Pressing it again displays =$A1. Pressing it one more time returns to the origi-
                                             nal =A1. Keep pressing F4 until Excel displays the type of reference that you want.
                                                       When you name a cell or range, Excel (by default) uses an absolute reference for the name. For
                                          NOTE
                                           NOTE
                                                       example, if you give the name SalesForecast to A1:A12, the Refers To box in the New
                                             Name dialog box lists the reference as $A$1:$A$12. This is almost always what you want. If you copy a cell
                                             that has a named reference in its formula, the copied formula contains a reference to the original name.
                                             Referencing cells outside the worksheet
                                             Formulas can also refer to cells in other worksheets — and the worksheets don’t even have to be in the same
                                             workbook. Excel uses a special type of notation to handle these types of references.
                                             Referencing cells in other worksheets
                                             To use a reference to a cell in another worksheet in the same workbook, use this format:
                                                  SheetName!CellAddress
                                             In other words, precede the cell address with the worksheet name, followed by an exclamation point. Here’s
                                             an example of a formula that uses a cell on the Sheet2 worksheet:
                                                  =A1*Sheet2!A1
                                             This formula multiplies the value in cell A1 on the current worksheet by the value in cell A1 on Sheet2.
                                            TIP        If the worksheet name in the reference includes one or more spaces, you must enclose it in
                                            TIP
                                                       single quotation marks. (Excel does that automatically if you use the point-and-click method.)
                                             For example, here’s a formula that refers to a cell on a sheet named All Depts:
                                               =A1*’All Depts’! A1
                                             Referencing cells in other workbooks
                                             To refer to a cell in a different workbook, use this format:
                                                  =[WorkbookName]SheetName!CellAddress
                                             In this case, the workbook name (in square brackets), the worksheet name, and an exclamation point pre-
                                             cede the cell address. The following is an example of a formula that uses a cell reference in the Sheet1
                                             worksheet in a workbook named Budget:
                                                  =[Budget.xlsx]Sheet1!A1



                                      190
   228   229   230   231   232   233   234   235   236   237   238