Removing Defined Names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have numerous defined names in a spreadsheet that I would like to delete.
Is there a way I can delete more than one at a time? I know how to use
"Insert/Name/Define/Delete", but it only allows me to delete one at a time so
it is very slow. Thanks.

John
 
Using a macro, like

Sub DeleteNames()
Dim Nm As Name
For Each Nm In ActiveWorkbook.Names
Nm.Delete
Next Nm
End Sub

which will delete all the names in your workbook. If you handle names
frequently, I'd recommend downloading the Name Manager, from here:

http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.htm
 
use

sub removenames ()
on error resume next
yu = array("nameone","nametwo","namethree")
for h = 0 to NumberOfNamesToRemove - 1
activeworkbook.names(yu(h)).delete
next
end sub

where yu = array("nameone","nametwo","namethree") the names you wish to
delete are replaced with the appropriate names to remove
and for h = 0 to NumberOfNamesToRemove - 1 replace NumberOfNamesToRemove
with the amount of names you are removing
 
The Names Manager utility, available here, is just what you need:

http://www.jkp-ads.com/Download.htm

--
Jim Rech
Excel MVP
| Hello,
|
| I have numerous defined names in a spreadsheet that I would like to
delete.
| Is there a way I can delete more than one at a time? I know how to use
| "Insert/Name/Define/Delete", but it only allows me to delete one at a time
so
| it is very slow. Thanks.
|
| John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top