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 How to delete names on worksheet?

I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default How to delete names on worksheet?

Press Alt+F11 to open the VB editor.

In the VB Editor click on INSERT in the menu and select MODULE

In your new module enter the following macro:

Sub ClearNames()

Dim wb As Workbook
Dim n As Name

For Each n In ThisWorkbook.Names
n.Delete
Next n

Set n = Nothing

End Sub

Save the macro by click on FILE in the menu and selecting SAVE

Press Alt + Q to return to the workbook or click FILE in the menu and select
CLOSE AND RETURN...

From the workbook press Alt + F8, select the macro named ClearNames and
click the RUN button.

Hope this helps...
--
Kevin Backmann


"GOH" wrote:

I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default How to delete names on worksheet?

Did you not see these answers to your duplicate post from a few days
ago?

http://groups.google.com/group/micro...36d0964e4e333f

Pete

On May 21, 2:33*pm, GOH wrote:
I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to delete names on worksheet?

I'd use Jan Karel Pieterse's (with Charles Williams and Matthew Henson) Name
Manager:

You can find it at:
NameManager.Zip from http://www.oaltd.co.uk/mvp

You may want to keep some of the names that you defined -- or keep the names
that excel uses that you didn't know even existed.

GOH wrote:

I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
GOH GOH is offline
external usenet poster
 
Posts: 13
Default How to delete names on worksheet?

Saw it now. Thanks.

"Pete_UK" wrote:

Did you not see these answers to your duplicate post from a few days
ago?

http://groups.google.com/group/micro...36d0964e4e333f

Pete

On May 21, 2:33 pm, GOH wrote:
I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.





  #6   Report Post  
Posted to microsoft.public.excel.misc
GOH GOH is offline
external usenet poster
 
Posts: 13
Default How to delete names on worksheet?

Thanks for your help. I tried, following your instruction but it resulted in
a "run-time error '1004'. that name is not valid.". When I debug, it
highlighted "n.Delete".



"Kevin B" wrote:

Press Alt+F11 to open the VB editor.

In the VB Editor click on INSERT in the menu and select MODULE

In your new module enter the following macro:

Sub ClearNames()

Dim wb As Workbook
Dim n As Name

For Each n In ThisWorkbook.Names
n.Delete
Next n

Set n = Nothing

End Sub

Save the macro by click on FILE in the menu and selecting SAVE

Press Alt + Q to return to the workbook or click FILE in the menu and select
CLOSE AND RETURN...

From the workbook press Alt + F8, select the macro named ClearNames and
click the RUN button.

Hope this helps...
--
Kevin Backmann


"GOH" wrote:

I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.


  #7   Report Post  
Posted to microsoft.public.excel.misc
GOH GOH is offline
external usenet poster
 
Posts: 13
Default How to delete names on worksheet?

I followed your instruction but it resulted in an error "run-time error
'1004': that name is not valid."


"Pete_UK" wrote:

Did you not see these answers to your duplicate post from a few days
ago?

http://groups.google.com/group/micro...36d0964e4e333f

Pete

On May 21, 2:33 pm, GOH wrote:
I have many names inherited from copying worksheet from external files, the
file now contains hundreds of names that is giving me some problems. Apart
from deleting one at a time using 'Insert'-'Name'-'Define', wonder anybody
know how I can delete all the names completely.



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default How to delete names on worksheet?

Just check that you have typed everything in correctly, including the
spaces.

Hope this helps.

Pete

On May 21, 3:26*pm, GOH wrote:
I followed your instruction but it resulted in an error "run-time error
'1004': that name is not valid."

  #9   Report Post  
Posted to microsoft.public.excel.misc
GOH GOH is offline
external usenet poster
 
Posts: 13
Default How to delete names on worksheet?

I copied your instruction over, so shouldn't have missed out anything.


"Pete_UK" wrote:

Just check that you have typed everything in correctly, including the
spaces.

Hope this helps.

Pete

On May 21, 3:26 pm, GOH wrote:
I followed your instruction but it resulted in an error "run-time error
'1004': that name is not valid."


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default How to delete names on worksheet?

Okay then, I've just done this in a workbook with named ranges. Try it
like this:

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

Copy this into the immediate window, then press <enter - it worked
for me.

Hope this helps.

Pete

On May 22, 2:56*pm, GOH wrote:
I copied your instruction over, so shouldn't have missed out anything.



"Pete_UK" wrote:
Just check that you have typed everything in correctly, including the
spaces.


Hope this helps.


Pete


On May 21, 3:26 pm, GOH wrote:
I followed your instruction but it resulted in an error "run-time error
'1004': that name is not valid."- Hide quoted text -


- Show quoted text -


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
Delete defined names beata Excel Discussion (Misc queries) 1 January 7th 08 09:44 PM
unable to delete Macro names George P Excel Discussion (Misc queries) 1 January 28th 07 10:17 PM
Delete names from a list ClemCadidlhoper Excel Discussion (Misc queries) 15 January 5th 06 10:50 PM
How to delete all defined names from a workbook? Dmitry Kopnichev Links and Linking in Excel 15 November 14th 05 03:26 PM
not delete worksheets from names in a range DARREN FONG Excel Discussion (Misc queries) 3 November 11th 05 05:31 PM


All times are GMT +1. The time now is 08:58 AM.

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"