How to Define a Named Range in Excel

Give descriptive names to specific cells or ranges of cells

Creating a Named Range using the Name Box in Excel
Creating a Named Range using the Name Box. © Ted French

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:

= SUM( Jan_Sales )

= June_Precip + July_Precip + Aug_Precip

Also, 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.

Defining a Name in Excel

Three different methods for defining a name in Excel are:

  • Using the Name Box (this page below)
  • Using the New Name dialog box
  • Using the Name Manager

Defining a Name 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.

  • 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:

  1. Highlight the desired range of cells in the worksheet.
  2. Type the desired name for that range in the name box, such as Jan_Sales.
  3. Press the Enter key on the keyboard.
  4. The name is displayed in the Name box.

Note: The name is also displayed in the Name box whenever the same range of cells is highlighted in the worksheet. It is also displayed in the Name Manager.

Naming Rules and Restrictions

The main syntax rules to remember when creating or editing names for ranges are:

  1. A name can't contain spaces.
  2. The first character of a name must be a
    • letter
    • underscore (_)
    • backslash (\)
  3. the remaining characters can only be
    • letters or numbers
    • periods
    • underscore characters
  4. The maximum name length is 255 characters.
  5. Uppercase and lowercase letters are indistinguishable to Excel, so Jan_Sales and jan_sales are seen as the same name by Excel.

Additional Naming Rules are:

  • Cell reference cannot be used as names such as A25 or R1C4.
  • Single character names are allowed except for "C", "c", "R", or "r" because they are linked to column and row cell references such as R1C4.
of 02

Defined Names and Scope in Excel

Excel Name Manager Dialog Box
Excel Name Manager Dialog Box. © Ted French

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:

  • individual worksheets – referred to as the local worksheet level scope
  • an entire workbook – global workbook level scope

A name must be unique within its scope, but the same name can be used in different scopes.

Note: The default scope for new names is the global workbook level. Once defined, the scope of a name cannot easily be changed. To change the scope of a name, delete the name in the Name Manager and redefine it with the correct scope.

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:

Sheet1!Total_Sales, Sheet2!Total_Sales

Note: Names created using the Name Box will always have a global workbook level scope unless both sheet name and the range name are entered into the name box when the name is defined.

Name: Jan_Sales, Scope - global workbook level
Name: 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 2014_Revenue!Sheet1.

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.

of 02

Defining and Managing Names with the Name Manager

Setting the Scope for Define Names in the Excel New Name Dialog Box
Setting the Scope in the New Name Dialog Box. © Ted French

Using the New Name Dialog Box

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

  1. Highlight the desired range of cells in the worksheet.
  2. Click on the Formulas tab of the ribbon.
  3. Click on the Define Name option to open the New Name dialog box.
  4. In the dialog box, you are required to define a:
    • Name
    • Scope
    • Range for the new name – comments are optional
  5. Once completed, click OK to return to the worksheet.
  6. The name will be displayed in the Name Box whenever the defined range is selected.

The Name Manager

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.

Defining a Name using the Name Manager

When defining a name in the Name Manager it opens the New Name dialog box outlined above. The complete list of steps are:

  1. Click the Formulas tab of the ribbon.
  2. Click on the Name Manager icon in the middle of the ribbon to open the Name Manager.
  3. In the Name Manager, click on the New button to open the New Name dialog box.
  4. In this dialog box, you are required to define a:
    • Name
    • Scope
    • Range for the new name – comments are optional
  5. Click OK to return to the Name Manager where the new name will be listed in the window.
  6. Click Close to return to the worksheet.

Deleting or Editing Names

With the Name Manager open,

  1. In the window containing the list of names, click once on the name to be deleted or edited.
  2. To delete the name, click on the Delete button above the list window.
  3. To edit the name, click on the Edit button to open the Edit Name dialog box.

In the Edit Name dialog box, you can:

  • edit the name.
  • edit or add a comment about the name.
  • change the range reference for the name. This can be done by highlighting the existing range in the dialog box and then selecting the new range in the worksheet to replace it.

Note: The scope of an existing name cannot be changed using the edit options. To change the scope, delete the name and redefine it with the correct scope.

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, and 
  • sort and filter listed names – defined (range) names or table names.

The filtered list is displayed in the list window in the Name Manager.