I’ve inherited quite a few large workbooks. The people who “owned” these before me were terrible with regards to naming ranges. They would create hundreds of them, use some of them, not others, make duplicates. Big mess.
My basic goal is to have a list of these Names in the workbook and then see where (and how often) they are being used. Thay way I can delete those that aren’t being used and generally clean up the workbook. As usual, I’m trying to avoid doing all of this manually.
I’ve tried two approaches:
1) Using the Range.Dependents.Count – Only counts those that are one the same worksheet as the where the named range is defined.
2) Use Find to search for the Defined Range name – I’ve tried it using Find, however there are instances where one name might be contained within another name. Unfortunately, I can’t control this. For example:
A1:F5 defined as “Name”
G2:H15 defined as “Name1”
If one cell has the formula “=sum(Name)” and another cell has the formula “=sum(Name1)”, using (and counting) with the Find function will return 2 for “Name”, because “Name” is contained within “Name1”.
It seems like there should be a way to count the # of times a defined name range is used in a workbook.