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

Setting Stable Column Widths in a PivotTable

When you update a PivotTable, Excel can take liberties with any formatting you previously applied to the PivotTable. ...

Discover More

Appending to a Non-Excel Text File

Does your macro need to add information to the end of a text file? This is called appending, and is done using the ...

Discover More

Limiting Searching to a Column

When you use Find and Replace, Excel normally looks through all the cells in a worksheet. You may want to limit the ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Saving Common Formulas

Got some formulas you slaved over and want to use in lots of workbooks? This tip presents some helpful ideas on how you ...

Discover More

Formatting Canadian Postal Codes

Postal codes in Canada consist of six characters, separated into two groups. This tip explains the format and then shows ...

Discover More

Figuring Out the Low-Score Winner

Need to figure out the lowest score in a range of scores? Here's the formulas to get the information you need.

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 nine minus 5?

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.