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

Letters Turn into Squares

Imagine that you are typing away, and all of a sudden your beautiful prose turns into a series of small rectangles that ...

Discover More

Stepping Through a Non-Contiguous Range of Cells

Using macros to step through each cell in a selection is a common occurrence. What if that selected range is made up of ...

Discover More

Initiating a New Search

I do a lot of searching in my documents. Sometimes the searches may not go exactly as I expected. Here are some things I ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Merging Cells to a Single Sum

One way to make your worksheets less complex is to get rid of detail and keep only the summary of that detail. Here's how ...

Discover More

Swapping Two Cells

If you need to swap the contents of two cells in your worksheet, Excel provides a number of ways you can approach the ...

Discover More

Mouse Scroll Wheel Doesn't Work when Editing Formulas

Using your mouse to select cells for inclusion in a formula can be an exercise in futility on some systems. Here's why ...

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

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.