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

Totaling Across Worksheets

Want to sum the values in the same cell on a range of worksheets? It's not as easy as summing a range on the same ...

Discover More

Displaying Table Gridlines

For those times when you remove the borders from your tables, Word provides a way that you can display non-printing ...

Discover More

Using Microsoft Fix It

Got a program on your system that you can't get rid of? Here's a handy little program that Microsoft provides that may be ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Address of a Cell in Which a Threshold is Exceeded

If you keep a lot of data in Excel, you may be interested in figuring out when that data surpasses a threshold. This tip ...

Discover More

Strange Value Results in a Cell

When Excel performs a calculation, the results you see in an unformatted cell may cause a bit of concern. This tip ...

Discover More

Looking Backward through a Data Table

Sometimes you need to look backward, through the information above your formula, to find the data you need. This can be ...

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 1 + 1?

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.