Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Changing the Reference in a Named Range.

Changing the Reference in a Named Range

Written by Allen Wyatt (last updated November 8, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


1

Using named ranges can be very handy when you are working with formulas or when you just want to keep track of what certain cells in a worksheet are used for. At some point, however, you may want to change the cells referred to by an existing named range. For instance, if a named range called MyRange refers to cells A1:A5, you may want to have it refer to cells C7:C19 instead.

The easiest way to change the range to which a name refers is to use the Name Manager. You can display the manager by displaying the Formula tab of the ribbon and clicking the Name Manager tool in the Defined Names group. (See Figure 1.)

Figure 1. The Name Manager.

The Name Manager lists all the named ranges that you've defined. You might think that you need to click Edit in order to make a change, but when changing the actual range associated with a name the process is even easier:

  1. In the list of names shown in the dialog box, click once on the name whose reference you want to change. (In this case, choose MyRange.) The existing reference should show up in the Refers To box at the bottom of the dialog box. (In this case it should show something like =Sheet1!$A$1:$A$5.)
  2. Modify the range reference in the Refers To box. (In this case, change it to =Sheet1!$C$7:$C$19.)
  3. Click the small green checkmark to the left of the Refers To box.

That's it; MyRange now refers to cells C7:C19 instead of A1:A5.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8237) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Changing the Reference in a Named Range.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Indent and Justify Command

WordPerfect users are familiar with the F4 command, which indents and justifies a paragraph. Word does not have an ...

Discover More

Clearing and Deleting Cells

When you want to remove information from a worksheet, you can either clear cells or delete cells. This tip examines the ...

Discover More

Searching for a Document

When switching from one version of Word to another it can be confusing to figure out where all the commands and features ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Randomly Assigning Names to Items

If you need to randomly match up items in two lists, there are a variety of techniques you can use. Here are a couple of ...

Discover More

Determining a Name for a Week Number

You could use Excel to collect data that is useful in your business. For instance, you might use it to collect ...

Discover More

Checking for Either of Two Text Values

Using a formula to find information in a text value is easy. Using a formula to find either of two text values within a ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

2020-09-21 04:51:42

eilering

If you want to change the name in a formula like
=first+second
into
=A1+A2, then use the routine below
Sub ChangeNameInFormulaIntoReference()
''On Error Resume Next
laatste = Selection.SpecialCells(xlCellTypeLastCell).Row
'which column contains the formulas
kolom = 4
Set nm = ActiveWorkbook.Names
For i = 1 To laatste
Cells(i, kolom).Select
deFormule = Cells(i, kolom).Formula
deFormule = Replace(deFormule, "*", " * ")
deFormule = Replace(deFormule, "=", " = ")
deFormule = Replace(deFormule, "/", " / ")
deFormule = Replace(deFormule, "+", " + ")
deFormule = Replace(deFormule, "-", " - ")
deFormule = Replace(deFormule, ";", " ; ")
deFormule = Replace(deFormule, ")", " ) ")
deFormule = Replace(deFormule, ",", " , ")
deFormule = Replace(deFormule, "^", " ^ ")
deFormule = Replace(deFormule, "(", " ( ")
deStart = 0
'splits het op
Dim Result() As String
Result = Split(deFormule, " ")
For k = 0 To UBound(Result())
FindValue = False
For w = 1 To nm.Count
If nm(w).Name = Result(k) Then
FindValue = True
Exit For
End If
Next
ditSheet = ActiveSheet.Name
If FindValue = True Then
adres = nm.Item(w).RefersTo
If InStr(1, adres, ditSheet) > 0 Then
'if the reference is an other sheet, it should be abolute reference
adres = nm.Item(w).RefersToRange.Address
adres = Replace(adres, "$", "")
End If
adres = Replace(adres, "=", "")
Result(k) = adres
End If
Next k
nieuweFormule = Join(Result)
If Left(nieuweFormule, 1) = " " Then nieuweFormule = Right(nieuweFormule, Len(nieuweFormule) - 1)
nieuweFormule = Replace(nieuweFormule, " ", "")
Cells(i, 6).Formula = nieuweFormule
If nieuweFormule <> "" Then nieuweFormule = Right(nieuweFormule, Len(nieuweFormule) - 1)
''Cells(i, 6).Formula = nieuweFormule
Next
End Sub


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.