Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to find where a certain named range is used in Excel?

After creating a named range, you may use this named range in many cells and formulas. But how to find out these cells and formulas in current workbook? This article introduces three tricky ways to solve it easily.

Find where a certain named range is used with Find and Replace feature

Find where a certain named range is used with VBA

Find where a certain named range is used with Kutools for Excel



arrow blue right bubble Find where a certain named range is used with Find and Replace feature

We can easily apply Excel’s Find and Replace feature to find out all cells applying the certain named range. Please do as follows:

1. Press the Ctrl + F keys simultaneously to open the Find and Replace dialog box.

Note: You can also open this Find and Replace dialog box with clicking the Home > Find & Select > Find.

2. In the opening Find and Replace dialog box, please do as following screenshot shown:

doc where named range used 1

 

(1) Type the name of certain named range into the Find what box;

(2) Select Workbook from the Within drop down list;

(3) Click the Find All button.

Note: If the Within drop down list is invisible, please click the Options button to expand the searching options.

Now you will see all cells containing the name of specified named range are listing at the bottom of Find and Replace dialog box. See screenshot:

doc where named range used 2

Note: The Find and Replace method not only finds out all cells using this certain named range, but also finds out all cells covering with this named range.


arrow blue right bubble Find where a certain named range is used with VBA

This method will introduce a VBA macro to find out all cells which use the certain named range in Excel. Please do as follows:

1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. Click the Insert > Module, and copy and paste following code into the opening Module window.

VBA: Find where a certain named range is used

Sub Find_namedrange_place()
Dim xRg As Range
Dim xCell As Range
Dim xSht As Worksheet
Dim xFoundAt As String
Dim xAddress As String
Dim xShName As String
Dim xSearchName As String
On Error Resume Next
xShName = Application.InputBox("Please type a sheet name you will find cells in:", "Kutools for Excel", Application.ActiveSheet.Name)
Set xSht = Application.Worksheets(xShName)
Set xRg = xSht.Cells.SpecialCells(xlCellTypeFormulas)
On Error GoTo 0
If Not xRg Is Nothing Then
xSearchName = Application.InputBox("Please type the name of named range:", "Kutools for Excel")
Set xCell = xRg.Find(What:=xSearchName, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
        If Not xCell Is Nothing Then
xAddress = xCell.Address
If IsPresent(xCell.Formula, xSearchName) Then
xFoundAt = xCell.Address
End If
            Do
Set xCell = xRg.FindNext(xCell)
If Not xCell Is Nothing Then
If xCell.Address = xAddress Then Exit Do
If IsPresent(xCell.Formula, xSearchName) Then
If xFoundAt = "" Then
xFoundAt = xCell.Address
Else
xFoundAt = xFoundAt & ", " & xCell.Address
End If
End If
Else
Exit Do
End If
Loop
End If
If xFoundAt = "" Then
MsgBox "The Named Range was not found", , "Kutools for Excel"
Else
MsgBox "The Named Range has been found these locations: " & xFoundAt, , "Kutools for Excel"
End If
On Error Resume Next
xSht.Range(xFoundAt).Select
End If
End Sub
Private Function IsPresent(sFormula As String, sName As String) As Boolean
Dim xPos1 As Long
Dim xPos2 As Long
Dim xLen As Long
Dim I As Long
xLen = Len(sFormula)
xPos2 = 1
Do
xPos1 = InStr(xPos2, sFormula, sName) - 1
If xPos1 < 1 Then Exit Do
IsPresent = IsVaildChar(sFormula, xPos1)
xPos2 = xPos1 + Len(sName) + 1
If IsPresent Then
If xPos2 <= xLen Then
IsPresent = IsVaildChar(sFormula, xPos2)
End If
End If
Loop
End Function
Private Function IsVaildChar(sFormula As String, Pos As Long) As Boolean
Dim I As Long
IsVaildChar = True
For I = 65 To 90
If UCase(Mid(sFormula, Pos, 1)) = Chr(I) Then
IsVaildChar = False
Exit For
End If
Next I
If IsVaildChar = True Then
If UCase(Mid(sFormula, Pos, 1)) = Chr(34) Then
IsVaildChar = False
End If
End If
If IsVaildChar = True Then
If UCase(Mid(sFormula, Pos, 1)) = Chr(95) Then
IsVaildChar = False
End If
End If
End Function
3. Click the Run button or press F5 Key to run this VBA.

4. Now in the first opening Kutools for Excel dialog box please type the worksheet name into it and click the OK button; and then in the second opening dialog box please type the name of certain named range into it, and click the OK button. See screenshots:

5. Now the third Kutools for Excel dialog box comes out and lists cells using the certain named range as below screenshot shown.

After clicking the OK button to close this dialog box, these found cells are selected in the specified worksheet at once.

Note: This VBA can only look for cells using the certain named range in one worksheet at a time.


arrow blue right bubbleFind where a certain named range is used with Kutools for Excel

In you have Kutools for Excel installed, its Replace Range Names utility can help you find and list all cells and formulas which use the certain named range in Excel.

Kutools for Excel - Combines more than 300 Advanced Functions and Tools for Microsoft Excel

1. Click the Kutools > More > Replace Range Names to open the Replace Range Names dialog box.

doc replace range names

2. In the opening Replace Range Names dialog box, go to Name tab, and click the Base Name drop down list and select the certain named range from it as below screenshot shown:

doc where named range used 4

Now all cells and corresponding formulas which use the certain named range are listing in the dialog box at once.

3. Close the Replace Range Names dialog box.

Kutools for Excel - Includes more than 300 handy Excel tools. Full feature free trial 60-day, no credit card required! Get it now!


In this Video, the Kutools tab and the Kutools Plus tab are added by Kutools for Excel. If need it, please click here to have a 60-day free trial without limitation!


Recommended Productivity Tools for Excel

kte tab 201905

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.