View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Delete cell names

give this a try

Sub remove_bad_ranges()
Dim nm As Name
On Error Resume Next
For Each nm In ThisWorkbook.Names
If InStr(1, Range(nm).Address, "#REF") Then
nm.Delete
End If
Next
End Sub


--


Gary


"René" wrote in message
...
Hello,

In a workbook I deleted a lot of sheets. But on these sheets there were a
lot of cell names. These cell names still exist in the workbook, but of
course there's no reference anymore.
Is there an easy way to delete these unreferenced cell names?

Greetings
René