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

Changing How Changes are Noted in Word

Do you want to modify how Word marks changes in your document? It's easy to do, depending on your version of Word.

Discover More

Quickly Removing a Toolbar Button

Want to get rid of a toolbar button? There's no need to drag open the menus and dialog boxes; just use the shortcut ...

Discover More

Moving Section Breaks

Section breaks are used to divide a document into two or more sections that can be independently formatted. If you want ...

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)

Counting Alphabetic Characters in a String

Need to find out how many times a certain letter appears in a text string? It's easy to do if you rely on the SUBSTITUTE ...

Discover More

Extracting a State and a ZIP Code

Excel is often used to process or edit data in some way. For example, you may have a bunch of addresses from which you ...

Discover More

Generating Random Strings of Characters

If you need to generate a random sequence of characters, of a fixed length, then you'll appreciate the discussion in this ...

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 two more than 7?

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.