![]() |
Delete "Unused names" in a batch
Hi,
my excel sheet has 100s of unused names that I would like to delete automatically. THere are also a range of hidden unused names which are not visible in the regular Insert - Name - Define. Quick help would be much appreciated Regards Dieter |
Delete "Unused names" in a batch
If you're working with names, get Jan Karel Pieterse's (with Charles Williams
and Matthew Henson) Name Manager: You can find it at: NameManager.Zip from http://www.oaltd.co.uk/mvp Remember that just because you don't see the name used in a worksheet, doesn't mean it's not used in any code. D0306 wrote: Hi, my excel sheet has 100s of unused names that I would like to delete automatically. THere are also a range of hidden unused names which are not visible in the regular Insert - Name - Define. Quick help would be much appreciated Regards Dieter -- Dave Peterson |
Delete "Unused names" in a batch
Dave,
I used the version 4.0, however, in order to delete the unused names, the tool requires to rename them individualy. It says that the name is "unusable" and the next pop up states "Name cannot resemble a reference" and it requires a new name. So, given the huge number, this is also rather cumbersome. Or do I miss something in the tool? I found some VB coding, which lists the unused names, however, my coding know how is too limited in order to change it so that deleted them, too. *********************** Sub ShowNames() i = 1 For Each nm In ActiveWorkbook.Names Cells(i, 1).Value = nm.Name Cells(i, 2).Value = nm.RefersTo Cells(i, 3).Value = nm.Visible i = i + 1 ActiveWorkbook.Names(nm.Name).Delete Next End Sub ******************************** Regards Dieter "Dave Peterson" wrote: If you're working with names, get Jan Karel Pieterse's (with Charles Williams and Matthew Henson) Name Manager: You can find it at: NameManager.Zip from http://www.oaltd.co.uk/mvp Remember that just because you don't see the name used in a worksheet, doesn't mean it's not used in any code. D0306 wrote: Hi, my excel sheet has 100s of unused names that I would like to delete automatically. THere are also a range of hidden unused names which are not visible in the regular Insert - Name - Define. Quick help would be much appreciated Regards Dieter -- Dave Peterson |
All times are GMT +1. The time now is 08:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com