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

Advanced Filtering

Many people know how to use AutoFilter, but there are times when you need some more filtering muscle. Here's how you can ...

Discover More

Using Check Boxes

Check boxes, just like those used in Windows dialog boxes, can be a great addition to a worksheet. Here's how to add them ...

Discover More

Changing Shading when a Column Value Changes

If you have a data table in a worksheet, and you want to shade various rows based on whatever is in the first column, ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Patterns of Numbers with a Formula

Want to create a sequential pattern using formulas? It's easy to do if you take a look at how your data repeats. This tip ...

Discover More

Referencing the Last Six Items in a Formula

If you have a list of data in a column, you may want to determine an average of whatever the last few items are in the ...

Discover More

Counting Asterisks

For some operations and functions, Excel allows you to use wild card characters. One such character is an asterisk. What ...

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 8 - 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.