How to create a defined name in Excel

What is Name Range in Excel?

The name range in Excel is the range that has been given a name for future reference. To make a range as a named range, select the range of data and then insert a table. Then, we put a name to the range from the Name Box on the left-hand side of the window. After this, we can refer to the range by its name in any formula.

The name range in Excel makes it much cooler to keep track of things, especially when using formulas. You can assign a name to a range. No problem with any change in that range; you need to update the range from the Name Manager in ExcelThe name manager in Excel is used to create, edit, and delete named ranges. For example, we sometimes use names instead of giving cell references. By using the name manager, we can create a new reference, edit it, or delete it.read more. You do not need to update every formula manually. Similarly, you can create a name for a formula. Then, if you want to use that formula in another formula or another location, refer to it by name.

  • The name ranges are significant because you can put any names in your formulas without considering cell references/addresses. Furthermore, you can assign the range with any name.
  • Create a named range for any data or a named constant and use these names in your formulas in place of data references. In this way, you can make your formulas easier to comprehend better. A named range is just a human-understandable name for a range of cells in Excel.
  • Using the name range in Excel, you can simplify and comprehend your formulas better. For example, you can assign a name for a range in an excel sheet for a function, a constant, or table data. Once you start using the names in your Excel sheet, you can easily understand these names.

Define Names For a Selected Range

  • Select the data range you want to assign a name, then select formulas and create from the selection.
How to create a defined name in Excel
  • Click on the “Create Names from Selection,” then select the “Top row,” “Left column,” “Bottom row,” or “Right column” checkbox and select “OK.”
How to create a defined name in Excel

Excel names the cells based on the labels in the range you designated.

  • Use names in formulas, then select a cell and enter a formula.
  • Place the cursor where you want to use the name range formula.
  • Type the first letter of the name, and select the name from the list that appears.
  • Or, select “Formulas,” then use in formula and select the name you want to use.
  • Press the “Enter” key.

Update named ranges in the Name Manager (Control + F3)

You can update the name from the Name Manager. Press “Ctrl” and “F3” to update the name. Select the name you want to change, then change the reference range directly.

How to Use Name Range in Excel?

Let us understand the working of conditional formatting by simple Excel examples.

Example #1 Create a name by using the Define Name option

Below are the steps to create a name by using the “Define Name” option:

  1. First, select the cell(s).


    How to create a defined name in Excel

  2. On the “Formulas” tab, click the “Define Name” in the “Defined Names” group.


    How to create a defined name in Excel

  3. In the “New Name” dialog box, specify three things:


    How to create a defined name in Excel

  4. First, in the “Name” box, type the range name.


    How to create a defined name in Excel

  5. In the “Scope” drop-down, set the name scope (Workbook by default).


    How to create a defined name in Excel

  6. In the “Refers to” box, check the reference and correct it if needed. Finally, click “OK” to save the changes and close the dialog box.


    How to create a defined name in Excel

Example #2 Make a named range by using Excel Name Manager

  • Go to the “Formulas” tab, then the “Defined Names” group, and click the “Name Manager” or press “Ctrl + F3” (the preferred way).
How to create a defined name in Excel
  • In the top left-hand corner of the “Name Manager” dialog window, click the “New… button:”
How to create a defined name in Excel

Name Range using VBA.

We can apply the naming in VBA; here is the example as follows:

Sub sbNameRange()

‘Adding a Name

Names.Add Name:=”myData”, RefersTo:=”=Sheet1!$A$1:$A$10″

‘OR

‘You can use Name property of a Range.

Sheet1.Range(“$A$1:$A$10”).Name = “myData”

End Sub

Things to Remember

We must follow the below instruction while using the name range.

  • The names can start with a letter, backslash (), or an underscore (_).
  • The name should be under 255 characters long.
  • The names must be continuous and cannot contain spaces and most punctuation characters.
  • There must be no conflict with cell references in names using in excelCell reference in excel is referring the other cells to a cell to use its values or properties. For instance, if we have data in cell A2 and want to use that in cell A1, use =A2 in cell A1, and this will copy the A2 value in A1.read more.
  • We can use single letters as names, but the letters “r” and “c” are reserved in Excel.
  • The names are not case-sensitive – “Tanuj”, “TANUJ”, and “TaNuJ” are all the same in Excel.

This article is a guide to the Name Range in Excel. We discuss using names in Excel, practical examples, and downloadable Excel templates here. You also may look at these useful functions in Excel: –

  • VBA RangeRange is a property in VBA that helps specify a particular cell, a range of cells, a row, a column, or a three-dimensional range. In the context of the Excel worksheet, the VBA range object includes a single cell or multiple cells spread across various rows and columns.read more
  • Data Tables ExcelA data table in excel is a type of what-if analysis tool that allows you to compare variables and see how they impact the result and overall data. It can be found under the data tab in the what-if analysis section.read more
  • Data Validation using ExcelThe data validation in excel helps control the kind of input entered by a user in the worksheet.read more
  • Paste SpecialPaste special in Excel allows you to paste partial aspects of the data copied. There are several ways to paste special in Excel, including right-clicking on the target cell and selecting paste special, or using a shortcut such as CTRL+ALT+V or ALT+E+S.read more

How do I create a defined name from a selection in Excel?

Define names from a selected range Select Formulas > Create from Selection. In the Create Names from Selection dialog box, designate the location that contains the labels by selecting the Top row,Left column, Bottom row, or Right column check box. Select OK.

How do you create a defined name for a range of cells?

Create a named range from selected cells in a worksheet.
Select the range you want to name, including the row or column labels..
Click Formulas > Create from Selection..
In the Create Names from Selection dialog box, select the checkbox (es) depending on the location of your row/column header. ... .
Click OK..

How do I create a dynamic name in Excel?

How to create a dynamic named range in Excel.
On the Formula tab, in the Defined Names group, click Define Name. Or, press Ctrl + F3 to open the Excel Name Manger, and click the New… button..
Either way, the New Name dialogue box will open, where you specify the following details: ... .
Click OK..