Page 131 - Excel 2007 Bible
P. 131
09_044039 ch05.qxp 11/21/06 10:56 AM Page 88
Part I
Getting Started with Excel
FIGURE 5.12
Create names for cells or ranges by using the New Name dialog box.
Type a name in the box labeled Name (or use the name that Excel proposes, if any). The selected cell or
range address appears in the box labeled Refers To. Use the Scope drop-down to indicate the scope for the
name. The scope indicates where the name will be valid, and it’s either the entire workbook, or a particular
sheet. If you like, you can add a comment that describes the named range or cell. Click OK to add the name
to your workbook and close the dialog box.
Using the Name box
A faster way to create a name is to use the Name box (to the left of the Formula bar). Select the cell or range
to name, click the Name box, and type the name. Press Enter to create the name. (You must press Enter to
actually record the name; if you type a name and then click in the worksheet, Excel doesn’t create the
name.) If a name already exists, you can’t use the Name box to change the range to which that name refers.
Attempting to do so simply selects the range.
The Name box is a drop-down list and shows all names in the workbook. To choose a named cell or range,
click the Name box and choose the name. The name appears in the Name box, and Excel selects the named
cell or range in the worksheet.
Using the Create Names From Selection dialog box
You may have a worksheet that contains text that you want to use for names for adjacent cells or ranges.
For example, you may want to use the text in column A to create names for the corresponding values in
column B. Excel makes this task easy to do.
To create names by using adjacent text, start by selecting the name text and the cells that you want to name.
(These items can be individual cells or ranges of cells.) The names must be adjacent to the cells that you’re
naming. (A multiple selection is allowed.) Then, choose Formulas ➪ Defined Names ➪ Create From
Selection. Excel displays the Create Names From Selection dialog box, shown in Figure 5.13. The check
marks in this dialog box are based on Excel’s analysis of the selected range. For example, if Excel finds text
in the first row of the selection, it proposes that you create names based on the top row. If Excel didn’t guess
correctly, you can change the check boxes. Click OK, and Excel creates the names.
NOTE If the text contained in a cell would result in an invalid name, Excel modifies the name to
NOTE
make it valid. For example, if a cell contains the text Net Income (which is invalid for a name
because it contains a space), Excel converts the space to an underscore character. If Excel encounters a
value or a numeric formula where text should be, however, it doesn’t convert it to a valid name. It simply
doesn’t create a name — and does not inform you of that fact.
88