Delete defined name

ehoory

New Member
Joined
Jun 25, 2008
Messages
7
Hi,
I have a file that contains hundred of names (defined name). Most of these names are linked to other files that are not existing any more.
I need your help to delete all the names.

thanks.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

adder70

New Member
Joined
Jun 19, 2008
Messages
7
Hi,
I have a file that contains hundred of names (defined name). Most of these names are linked to other files that are not existing any more.
I need your help to delete all the names.

thanks.

Ooh! I can answer that!

Open name manager. It's on the Formulas ribbon in 2007, or just open help to see where it is. This will give a dialog box with all the names. You can shift+select to select a whole bunch at once. You should be able to sort by the "refers to" column to align the ones you want to delete.
 
Upvote 0

iggydarsa

Well-known Member
Joined
Jun 28, 2005
Messages
1,734
Office Version
  1. 2019
Platform
  1. Windows
I couldnt find a way to select multiple Names in version 2003 and earlier, so you might want to run this macro to delete all the Names in the workbook

Code:
Sub delName()
For Each nm In Names
    ActiveWorkbook.Names(nm.Name).Delete
Next nm
End Sub
 
Upvote 0

ehoory

New Member
Joined
Jun 25, 2008
Messages
7
I tried to run the macro you send me but I got error 1004.
Do you know what it means?
I use XL 2002.
 
Upvote 0

iggydarsa

Well-known Member
Joined
Jun 28, 2005
Messages
1,734
Office Version
  1. 2019
Platform
  1. Windows
if you run this:

Code:
Sub zz()
x = ActiveWorkbook.Names.Count
MsgBox x 
End Sub

the value should display on a popup window
 
Upvote 0

Forum statistics

Threads
1,191,187
Messages
5,985,194
Members
439,947
Latest member
fabiannic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top