Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
GOH GOH is offline
external usenet poster
 
Posts: 13
Default Excel names in workbook - how to delete all?

How do you delete all the 'names' defined @ workbook? I can only do it 1 at
time now using 'Insert'-'Name'-'Define'......however, I have hundreds of them
(accumlated unknowingly, when I copied 3rd party worksheet - it seem that the
names juz get copied over each time you copy from another file).

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Excel names in workbook - how to delete all?

Sub DeleteNames()
Dim nm As Object
For Each nm In ActiveWorkbook.Names
nm.Delete
Next
End Sub

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"GOH" wrote:
How do you delete all the 'names' defined @ workbook? I can only do it 1 at
time now using 'Insert'-'Name'-'Define'......however, I have hundreds of them
(accumlated unknowingly, when I copied 3rd party worksheet - it seem that the
names juz get copied over each time you copy from another file).

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Excel names in workbook - how to delete all?

Sub DeleteNames()
Dim nme As Name

For Each nme In ActiveWorkbook.Names
If nme.Name Like "*_FilterDatabase" Or _
nme.Name Like "*Print_Area" Or _
nme.Name Like "*Print_Titles" Or _
nme.Name Like "*wvu.*" Or _
nme.Name Like "*wrn.*" Or _
nme.Name Like "*!Criteria" Then
Else
nme.Delete
End If
Next nme

End Sub

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"GOH" wrote in message
...
How do you delete all the 'names' defined @ workbook? I can only do it 1
at
time now using 'Insert'-'Name'-'Define'......however, I have hundreds of
them
(accumlated unknowingly, when I copied 3rd party worksheet - it seem that
the
names juz get copied over each time you copy from another file).

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Excel names in workbook - how to delete all?

You can type this little routine into the immediate window - Alt_F11
to bring up the VBE, then CTRL-G to get the Immediate Window, then
type:

For Each n In ActiveWorkbook.Names : n.Delete : Next n

Press <Enter at the end of the line, and all your names will be
deleted.

Hope this helps.

Pete


On May 19, 11:07*am, GOH wrote:
How do you delete all the 'names' defined @ workbook? I can only do it 1 at
time now using 'Insert'-'Name'-'Define'......however, I have hundreds of them
(accumlated unknowingly, when I copied 3rd party worksheet - it seem that the
names juz get copied over each time you copy from another file).

Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 169
Default Excel names in workbook - how to delete all?

In article , ?B?R09I?= wrote:
How do you delete all the 'names' defined @ workbook? I can only do it 1 at
time now using 'Insert'-'Name'-'Define'......however, I have hundreds of them
(accumlated unknowingly, when I copied 3rd party worksheet - it seem that the
names juz get copied over each time you copy from another file).

Thanks.


If you work with names a bit, try the name manager add on. Google suggests
http://www.jkp-ads.com/officemarketplacenm-en.asp

HTH
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete all names ranges in a workbook after freezing form Wins07 Excel Discussion (Misc queries) 3 February 14th 07 06:32 PM
Delete cell names on complete workbook deacs Excel Discussion (Misc queries) 2 February 23rd 06 11:43 AM
How to delete all defined names from a workbook? Dmitry Kopnichev Excel Worksheet Functions 15 November 14th 05 03:26 PM
How to delete all defined names from a workbook? Dmitry Kopnichev Links and Linking in Excel 15 November 14th 05 03:26 PM
Delete Define names across workbook Mike Excel Worksheet Functions 4 September 28th 05 12:41 AM


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"