如何在 Excel 中找到某个特定名称区域的使用位置?
创建一个名称区域后,您可能在许多单元格和公式中使用了该名称区域。但是,如何在当前工作簿中找出这些单元格和公式呢?本文介绍了三种巧妙的方法来轻松解决这个问题。
使用 Kutools for Excel 查找某个特定名称区域的使用位置
使用“查找和替换”功能查找某个特定名称区域的使用位置
我们可以轻松应用 Excel 的“查找和替换”功能来找出所有应用了特定名称区域的单元格。请按照以下步骤操作:
1. 同时按下 Ctrl + F 键以打开“查找和替换”对话框。
注意:您也可以通过点击“开始”>“查找和选择”>“查找”来打开此“查找和替换”对话框。
2. 在打开的“查找和替换”对话框中,请按照以下截图所示进行操作:

(1) 在“查找内容”框中输入特定名称区域的名称;
(2) 从“范围”下拉列表中选择“工作簿”;
(3) 点击“查找全部”按钮。
注意:如果“范围”下拉列表不可见,请点击“选项 ”按钮以展开搜索选项。
现在,您将看到所有包含指定名称区域名称的单元格都列在“查找和替换”对话框的底部。请参见截图:
注意:“查找和替换”方法不仅可以找出所有使用该特定名称区域的单元格,还可以找出所有覆盖该名称区域的单元格。
使用 VBA 查找某个特定名称区域的使用位置
此方法将介绍一个 VBA 宏,用于找出所有使用该特定名称区域的单元格。请按照以下步骤操作:
1. 同时按下 Alt + F11 键以打开 Microsoft Visual Basic for Applications 窗口。
2. 点击“ 插入”>“模块”,并将以下代码复制并粘贴到打开的“模块”窗口中。
VBA:查找某个特定名称区域的使用位置
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. 点击 运行 按钮或按 F5 键运行此 VBA。 4. 现在,在第一个打开的 Kutools for Excel 对话框中,请输入工作表名称并点击“确定”按钮;然后在第二个打开的对话框中,请输入特定名称区域的名称,并点击“确定”按钮。请参见截图:


5. 现在,第三个 Kutools for Excel 对话框弹出,并列出使用该特定名称区域的单元格,如下截图所示。
点击“确定”按钮关闭此对话框后,这些找到的单元格会立即在指定的工作表中被选中。
注意:此 VBA 每次只能在一个工作表中查找使用该特定名称区域的单元格。
使用 Kutools for Excel 查找某个特定名称区域的使用位置
如果您已安装 Kutools for Excel,其“替换区域名称”工具可以帮助您查找并列出所有使用该特定名称区域的单元格和公式。
Kutools for Excel - 包含超过 300 个 Excel 必备工具。永久免费享受 AI 功能!立即下载!
1. 点击“Kutools”>“更多”>“替换区域名称 ”以打开“替换区域名称”对话框。
2. 在打开的“替换区域名称”对话框中,转到“名称”选项卡,并点击“基于名称” 下拉列表,从中选择特定名称区域,如下截图所示:
现在,所有使用该特定名称区域的单元格及其对应的公式都会立即列在对话框中。
3. 关闭“替换区域名称”对话框。
Kutools for Excel - 通过超过300个必备工具,让Excel功能大幅提升。永久免费享受AI功能!立即获取
演示:在 Excel 中查找某个特定名称区域的使用位置
最佳办公效率工具
🤖 | Kutools AI 助手:基于智能执行、生成代码、创建自定义公式、分析数据并生成图表、调用 Kutools 函数等功能,彻底改变数据分析方式… |
热门功能:查找、高亮或标记重复项 | 删除空行 | 合并不丢失数据的列或单元格 | 四舍五入 ... | |
高级 LOOKUP:多条件 VLookup | 多值 VLookup | 多表查找 | 模糊查找 .... | |
高级下拉列表:快速创建下拉列表 | 从属下拉列表 | 多选下拉列表 .... | |
列管理器: 添加指定数量的列 | 移动列 | 切换隐藏列的可见状态 | 比较区域和列 ... | |
精选功能:网格聚焦 | 设计视图 | 增强编辑栏 | 工作簿与工作表管理器 | 资源库(自动文本) | 日期提取 | 合并数据 | 加密/解密单元格 | 按列表发送电子邮件 | 超级筛选 | 特殊筛选(筛选粗体/斜体/删除线...)... | |
排名前 15 的工具集: 12 种文本 工具(添加文本、删除特定字符等) | 50 多 种图表 类型(甘特图等) | 40 多种实用 公式(基于生日计算年龄等) | 19 种插入 工具(插入二维码、根据路径插入图片等) | 12 种转换 工具(小写金额转大写、汇率转换等) | 7 种合并与分割 工具(高级合并行、分割单元格等) | 还有更多... |
使用 Kutools for Excel 提升您的 Excel 技能,体验前所未有的高效。 Kutools for Excel 提供超过 300 种高级功能来提高生产力并节省时间。 单击此处获取您最需要的功能...
Office Tab 将标签式界面引入 Office,让您的工作更加轻松
- 在 Word、Excel、PowerPoint 中启用标签式编辑和阅读。
- 在同一窗口的新标签页中打开和创建多个文档,而不是在新窗口中进行操作。
- 将您的生产力提升 50%,每天为您减少数百次鼠标点击!