View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Mass deletion of block names

To just delete the bad ones try this. For ALL use n.delete (be CAREFUL what
you ask for)

Sub donames()
For Each n In Names
If InStr(n, "#REF") 0 Then n.Delete 'MsgBox n
Next
End Sub


--
Don Guillett
SalesAid Software

"danhattan" wrote in message
...
I manage a large, complex spreadsheet that tracks statistical information
for
several of our operations centers. It's been in existence since the mid
90's
and as our company structure has evolved so has the spreadsheet.

My problem is that there are now roughly 2000 named blocks in the
spreadsheet, although many reference areas of the spreadsheet no longer
used.

Is there a way to delete several hundred defined block names in a single
stroke. I'm relatively fluent in VBA so there's a coding solution I'm open
to
it.

Thanks in advance for any help.