Hi,
I have the code below that successfully deletes all named ranges that are displaying #REF!
I tried adapting it to delete all named ranges that are displaying #NAME? by simply changing the #REF! to #NAME? in the code but alas it didn't work. Any thoughts on how this can be achieved?
Any help much appreciated.
I have the code below that successfully deletes all named ranges that are displaying #REF!
I tried adapting it to delete all named ranges that are displaying #NAME? by simply changing the #REF! to #NAME? in the code but alas it didn't work. Any thoughts on how this can be achieved?
Any help much appreciated.
VBA Code:
For Each NR In ActiveWorkbook.Names
If InStr(NR.Value, "#REF!") Then NR.Delete
Next