Identifying Unused Named Ranges

Written by Allen Wyatt (last updated February 9, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


2

Anthony has a number of workbooks that have named ranges defined in them. Over time, the use of these named ranges changes. He wonders if there is a way to check if a named range is still being used or referenced in a workbook. He wants to delete the named ranges that are no longer needed.

The answer to this question is trickier than you might think. The reason is that named ranges can be used in many, many places. The most common place to use them is in the formulas in a workbook. Those are actually easy to locate and, if you desire, to delete. That was covered in a previous ExcelTip: Finding Unused Names.

That isn't all, though. Named ranges can also be referenced in macros, in conditional formatting rules, in a chart, in drop-down lists, and in a number of other objects. They can also be used in other workbooks that reference the current workbook.

Some of these things you might be able to check using a macro, such as charts and conditional formatting rules. If you want to check if a named range is used in a macro, you could export your macros to a text document and then use a different program to search the text document. It becomes almost impossible to track down named ranges used in external workbooks, though.

As you can tell, tracking down whether a named range is "in use" becomes almost near impossible without placing limits on what you will search and where you will search for it.

There's an entirely different type of named-range problem that you can track down and clean up using tools that Excel provides. If you pop up the Name Manger (press Ctrl+F3 to display it), you can use it to find invalid named ranges. (It is impossible for invalid named ranges to be used, because even if they are referenced somewhere, they will return invalid results.)

Within the Name Manager you should see a list of all the names defined within the current workbook. Take a look at both the Value and Refers To column. If any of those have the characters #REF! in them, you can safely delete them—they are no longer valid named ranges.

If you further explore using the Name Manager, you'll want to look at any ranges that have "no value" in the Value column. These are ones that may be pointing to the wrong area of the worksheet.

If you want to expand on what you can do with the Name Manager, you might consider this third-party add-in from Microsoft MVP Jan-Karel Pieterse:

http://www.jkp-ads.com/OfficeMarketPlacenm-en.asp

The add-in is free, and you can use it to display unused names. You can then selectively (or totally) delete the unused names located.

Again, remember that regardless of the approach you use you may end up deleting named ranges that shouldn't have been deleted. You'll only discover this over time, so you may want to make sure you keep a copy of the workbook before you do any cleanup.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3153) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

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

Ensuring Unique Values in a Column

If you want to make sure that only unique values are entered in a particular column, you can use the data validation ...

Discover More

Iterating Circular References

Does your data require that you perform calculations using circular references? If so, then you'll want to be aware of ...

Discover More

Using a Custom Date Format in a Header or Footer

Need to show a custom date in the header or footer of a printout? You'll need to resort to using a macro, as described in ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Getting Rid of All Rows Except the One for the Latest Date

As you use Excel to collect data over time, sometimes winnowing out the latest data can present a challenge. Here are a ...

Discover More

Ensuring Rows and Columns are Empty

Before you go about deleting rows and columns helter-skelter, it is a good idea to determine if there is anything in the ...

Discover More

Importing a Subset of Records

If you only want to import a portion of whatever records are in a text file, Excel provides a number of ways you can ...

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 1 + 1?

2023-02-11 15:59:07

J. Woolley

For more on this subject, see https://excelribbon.tips.net/T010338_Getting_Rid_of_Unused_Range_Names.html


2019-07-13 20:12:48

Sal Veltri

Hi Alan,
I have two items to present to you;
1. I am a subscriber to Excel Tips and find it very informative and useful - Thank you
2. A couple of years back I had a problem with using the Proper function. I was entering a long list of names using the function. I found that several names did not follow the normal rule, mackenzie, i.e. Mackenzie should have been MacKenzie. After extensive searching I found a a function ProperLookup, that uses a lookup table with your names that don't follow the normal rule. If you are not aware of this function or think your readers would benefit from this, send me a note and I will forward it to you.


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.