Defining and Managing Names with the Name Box
One way, and possibly the easiest way, of defining names is using the Name Box, located above column A in the worksheet. You can use this method to create unique names that are recognized by every sheet in a workbook. To create a name using the Name Box as shown in the image above:
Naming Rules and Restrictions
Syntax rules to remember when creating or editing names for ranges are as follows:
A name can’t contain spaces.The first character of a name must be either a letter, underscore, or backslash.The remaining characters can only be letters, numbers, periods, or underscore characters.The maximum name length is 255 characters.Uppercase and lowercase letters are indistinguishable to Excel, so Jan_Sales and jan_sales are seen as the same name by Excel.Cell reference cannot be used as names such as A25 or R1C4.
What Is a Named Range?
A named range, range name, or defined name all refer to the same object in Excel; it’s a descriptive name — such as Jan_Sales or June_Precip — that is attached to a specific cell or range of cells in a worksheet or workbook. Named ranges make it easier to use and identify data when creating charts, and in formulas such as: Additionally, since a named range does not change when a formula is copied to other cells, it provides an alternative to using absolute cell references in formulas. There are three methods for defining a name in Excel: using the name box, the new name dialog box, or the name manager.
Defining and Managing Names with the Name Manager
A second method for defining names is to use the New Name dialog box. This dialog box is opened using the Define Name option located in the middle of the Formulas tab of the ribbon. The New Name dialog box makes it easy to define names with a worksheet level scope. To create a name using New Name dialog box: The Name Manager can be used to both define and manage existing names; it is located next to the Define Name option on the Formulas tab of the ribbon. When defining a name in the Name Manager it opens the New Name dialog box outlined above. The complete list of steps are as follows:
Deleting or Editing Names
With the Name Manager open:
Filtering Names
The Filter button in the Name Manager makes it easy to:
Find names with errors – such as an invalid range.Determine the scope of a name – whether worksheet level or workbook.Sort and filter listed names – defined (range) names or table names.
The filtered list is displayed in the list window in the Name Manager.
Defined Names and Scope in Excel
All names have a scope which refers to the locations where a specific name is recognized by Excel. A name’s scope can be for either individual worksheets (local scope) or for an entire workbook (global scope). A name must be unique within its scope, but the same name can be used in different scopes.
Local Worksheet Level Scope
A name with a worksheet level scope is valid only for the worksheet for which it was defined. If the name Total_Sales has a scope of sheet 1 of a workbook, Excel will not recognize the name on sheet 2, sheet 3, or any other sheet in the workbook. This makes it possible to define the same name for use on multiple worksheets – as long as the scope for each name is restricted to its particular worksheet. Using the same name for different sheets might be done to ensure continuity between worksheets and ensure that formulas that use the name Total_Sales always refer to the same range of cells in multiple worksheets within a single workbook. To distinguish between identical names with different scopes in formulas, precede the name with the worksheet name, such as: Or Examples:
Name: Jan_Sales, Scope — global workbook levelName: Sheet1!Jan_Sales, Scope — local worksheet level
Global Workbook Level Scope
A name defined with a workbook level scope is recognized for all worksheets in that workbook. A workbook level name can, therefore, only be used once within a workbook, unlike the sheet level names discussed above. A workbook level scope name is not, however, recognized by any other workbook, so global level names can be repeated in different Excel files. For example, if the Jan_Sales name has a global scope, the same name could be used in different workbooks titled 2012_Revenue, 2013_Revenue, and 2014_Revenue.
Scope Conflicts and Scope Precedence
It is possible to use the same name at both the local sheet level and workbook level because the scope for the two would be different. Such a situation, however, would create a conflict whenever the name was used. To resolve such conflicts, in Excel, names defined for the local worksheet level take precedence over the global workbook level. In such a situation, a sheet-level name of 2014_Revenue would be used instead of a workbook level name of 2014_Revenue. To override the rule of precedence, use the workbook level name in conjunction with a specific sheet-level name such as: The one exception to overriding precedence is a local worksheet level name that has a scope of sheet 1 of a workbook. Scopes linked to sheet 1 of any workbook cannot be overridden by global level names.