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

Determining If a Number is Odd or Even

If you need to know whether a particular value is odd or even, you can use this simple formula. Designed to be used in a ...

Discover More

Changing How Arrows Look

If you use Excel's graphic capabilities to insert a line or an arrow into a worksheet, you can change how that arrow ...

Discover More

Expanding PivotTable Rows to Sheets

PivotTables are a great way to work with large quantities of data in an intelligent manner. Sometimes, however, you just ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Using the Fill Handle from the Keyboard

The fill handle can save a huge amount of time when you are editing a worksheet. If you are really good at using the ...

Discover More

Deleting Rows Containing Struck-Through Text

Excel makes it easy to delete rows in a worksheet, but it can be more difficult to figure how to delete rows if you only ...

Discover More

Can't Copy Data between Workbooks

Edit a group of workbooks at the same time and you probably will find yourself trying to copy information from one of ...

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 5 + 3?

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.