delete multiple range names

M

mnsue

I have a workbook with multiple sheets. The workbook was built by someone
else and has multiple range names that are no longer needed. How can I
delete all range names to start fresh?
 
E

Eduardo

Hi,
In excel 2007 , go to Formulas, Name manager, choose the name to delet and
click delete
 
R

RonaldoOneNil

The following macro will delete all range names in the active workbook

Sub Delete_Named_Ranges()
Dim i As Integer
For i = 1 To ActiveWorkbook.Names.Count
ActiveWorkbook.Names(i).Delete
Next i
End Sub
 
T

trip_to_tokyo

In EXCEL 2007 take the following actions:-

Formulas / Name Manager / highlight those you wish to delete / Delete / OK.

Please hit Yes if my comments have helped.

Thanks.
 
M

mnsue

How would it work in Excel 2003 because that is what I'm using? I can delete
one at a time but not multiple range names.
 
M

mnsue

I tried this but get an error message of 1004. It seems to hang up on the
ActiveWorkbood.Names. I am working in excel 2003 if that makes a difference.
 
M

mnsue

It did not work. I'm still getting an error message of 1004. I think it
said invalid name. Any other suggestions?
 
G

Gord Dibben

I misspoke because I did not read properly.

Dim i as Integer produces error 9........subscript out of range

Dim i as Long works fine.

Error 1004 is entirely something else.

I don't know what would produce a 1004 error

Perhaps someone can jump in so's we can learn?


Gord
 

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

Top