![]() |
Deleting broken range names
For Each nm In ActiveWorkbook.Names
if instr(nm.Refersto,"#") then nm.Delete end if Next -- Regards, Tom Ogilvy "Ray Kanner" wrote in message ... I have a lot of range names in my workbook. After some time, some of them no longer point anywhere, and I'd like to delete them. I cannot do this manually since the broken range names do not show up under Insert/Name/Define. I would like to write a simple loop that works as follows: For Each nm In ActiveWorkbook.Names <If nm is broken then delete nm Next Can someone please help me fill in the missing line. Thanks in advance Ray Kanner |
All times are GMT +1. The time now is 07:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com