Identifying Unused Named Ranges

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


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 2021.

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

Removing Entire Paragraphs from Your Document

If you need to get rid of a lot of paragraphs in a document, it's easy to do as long as the document relies on styles for ...

Discover More

Index Number for the Active Table

For some programming needs, it is important to determine the index of an object within a collection of such objects. This ...

Discover More

Complex Searches for Documents

When working with lots of documents, you may have need from time to time to discover which of those documents contain ...

Discover More

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!

More ExcelTips (ribbon)

Copying Subtotals

If you have added subtotals to your worksheet data, you might want to copy those subtotals somewhere else. This is easy ...

Discover More

Ignoring Special Characters when Double-Clicking

If a word contains a special character within it, Excel actually thinks the single word is two words. This tip examines ...

Discover More

Referencing the Last Cell in a Column

When developing formulas, you may need to reference the very last value in a particular column. This can seem perplexing, ...

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

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.