Range Names quick delete

N

Nick

Hello

I have about 50-60 range names in my excel worksheet and
want to delete them all, but don't want to have to click
on each and press delete. Does anyone know a quick way to
delete all the range names?

Cheers
Nick
 
A

Alan Beban

Nick said:
Hello

I have about 50-60 range names in my excel worksheet and
want to delete them all, but don't want to have to click
on each and press delete. Does anyone know a quick way to
delete all the range names?

Cheers
Nick
Sub abcde2()
For Each IName In ThisWorkbook.Names
IName.Delete
Next
End Sub

Alan Beban
 
G

Gavin.Bird

Try This

Public Sub DeleteNames()
For i = 1 To ActiveWorkbook.Names.Count
ActiveWorkbook.Names(1).Delete
Next i
End Sub

Gavin.Bird
 
D

Don Guillett

Here are some that will help.
Sub DeleteSHEETnames() 'for JUST sheet named BIGLIST
For Each Name In Names
If Left(Name, 4) = "=BIG" Then Name.Delete
Next
End Sub

Sub DeleteAllNames() 'ALL sheets
For Each Name In Names
Name.Delete
Next Name
End Sub

Sub DeleteAllNames_Umlas()
ExecuteExcel4Macro "SUM(DELETE.NAME(NAMES()))"
End Sub
 
D

Dave Peterson

There are names that excel creates for you that I wouldn't want to delete.

If you want a bit more control, you may want to download Jan Karel Pieterse's
(with Charles Williams and Matthew Henson) Name Manager.

You can find it at:
NameManager.Zip from http://www.bmsltd.ie/mvp
 
Top