Macro to Finded Defined Names with #REF

  • Thread starter Thread starter Kay
  • Start date Start date
K

Kay

Howdy
Is there a way that I could create a macro to find and
delete defined names that refer to #REF? I have over a
100 defined names in several workbooks that I need to
delete.
smiles
Kay
 
Kay,

Try something like the following code:

Dim N As Excel.Name
For Each N In ThisWorkbook.Names
If InStr(1, "#REF", N.RefersTo) Then
N.Delete
End If
Next N


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top