Delete broken named ranges in sheet
Hi Norman
Your code seams to do the job. Thanks!
"Norman Jones" skrev:
Hi Akyhne.
Try:
Sub DeleteBrokenNames()
Dim Nme As Name
For Each Nme In ActiveWorkbook.Names
If Right(Nme.RefersTo, 5) = "#REF!" Then
Nme.Delete
End If
Next Nme
End Sub
---
Regards,
Norman
"akyhne" wrote in message
...
How to delete broken named ranges in sheet?
When you manually delete rows or columns than contains named ranges, the
named ranges in the deleted area is not deleted, but remains with a faulty
reference as (Example): MYNAMEDRANGE =SHEETS!#REFERENCE!
|