Anyone who has created a large workbook knows that it is very easy to create a large list of named ranges. Managing those ranges, particularly if you inherit the workbook from someone else, is a much harder task. Part of the problem is that you may lose track of all your ranges and what they refer to.
Having a list of the names in your workbook could be helpful. To get a list, follow these steps:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7731) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Printing a List of Named Ranges.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
If you need to make what Excel prints be based upon conditions in a worksheet, you'll love the information in this tip. ...
Discover MoreWant to print out the fastest possible copy of your worksheet? You do so by printing a draft, discussed in this tip.
Discover MoreThe Print Preview feature in Excel can be quite helpful. You might think it would be more helpful, though, if it ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-06-27 08:46:59
Peter Atherton
Walk away, have a bite to eat and all is revealed. Revised Procedure.
Sub ListNames()
[a1].CurrentRegion.ClearContents
[a1] = "Name"
[b1] = "Refers To"
[A2].ListNames
Dim i As Long, wks As Worksheet, tbl As ListObject
[a1].Select
i = Range("a1").End(xlDown).Row
For Each wks In Worksheets
For Each tbl In wks.ListObjects
i = i + 1
Cells(i, 1) = tbl.Name
Cells(i, 2) = tbl.Parent.Name & "!" & tbl.Range.Address
Next tbl
Next
Columns("A:B").AutoFit
End Sub
2020-06-27 07:38:43
Peter Atherton
to all: List Table and Range Names:
Best to be done with a macro
Sub ListNames()
[a1] = "Name"
[b1] = "Refers To"
[A2].ListNames
Dim i As Long, wks As Worksheet, tbl As ListObject
[a1].Select
i = Range("a1").End(xlDown).Row
For Each wks In Worksheets
For Each tbl In wks.ListObjects
i = i + 1
Cells(i, 1) = tbl.Name
Next tbl
Next
End Sub
I haven't found how to get the table reference yet.
(see Figure 1 below)
Figure 1. List Names & Table Names
2020-06-26 03:08:37
Crissie
This method fails to list all my defined names, just the cells that fall within ranges versus TABLES I assigned names for. How can I generate a complete list?
2020-03-19 05:49:57
John
Excellent tip - so simple, yet saved hours of screen capturing to get the same info!
2019-07-31 16:40:48
Very helpful thanks!!
2019-03-11 10:15:59
Mary
I realize this is an old thread, but I just tried it. It works great - for names scoped to "workbook." I have a workbook that has many sheets with named ranges scoped to the individual sheets. Is there any way to list ALL the names on one sheet?
2017-10-23 10:30:22
Gregg
I do not use named ranges, but I use a lot of tables. How can I print list of table names and references?
2017-10-23 00:19:34
Kevin
Can you explain what Names may not appear in the list?
In a sheet started by someone else I can see 44 names in the "Name Manager". The printed list and naming box however only have 37 in them . 3 of the missing relate to Print_Area (1) and Print_Titles (2 on different sheets).
The other 4 when found on the relevant sheets show up in the naming box when the area is selected. One of these areas is differently noted in the "Name Manager - Refers to" than actually required to be selected as an area to appear in the naming box.
2017-10-22 07:12:45
Michael (Micky) Avidan
@Brian,
I assume it was a Typo on your side.
{A1].listnames is wrong ([A1].listnames is OK)
By the way - I usually don't suggest VBE stuff because 8 out of 10 of Excek users are not familiar with what you are talking about.
You will agree that, in this case, hitting [F3] and then 'Paste List' is somehow a little shortes procedure.
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” Excel MVP – Excel (2009-2018)
ISRAEL
2017-10-21 08:48:40
Brian
In the VBE immediate window
{A1].listnames
2017-10-21 05:44:58
Michael (Micky) Avidan
@To whom it may concern,
Pressing <F3> and clicking 'Paste List' is a somehow shortes/faster.
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” Excel MVP – Excel (2009-2018)
ISRAEL
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments