#ref macro

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

How can i create a macro that will delete all #refs in the
insert name dialog box?

Thanks in advance.

Dave
 
for each nm in thisworkbook.Names
if instr(1,nm.Refersto,"#") then
nm.Delete
end if
Next

If this doesn't delete them (or doesn't delete all of them), go to tools
Options and in the general tab change to R1C1 addressing. Then repeat,
unselecting R1C1 address. On one of the changes, Excel should offer to
delete the bad names I believe.
 
That worked thanks Tom!
-----Original Message-----
for each nm in thisworkbook.Names
if instr(1,nm.Refersto,"#") then
nm.Delete
end if
Next

If this doesn't delete them (or doesn't delete all of them), go to tools
Options and in the general tab change to R1C1 addressing. Then repeat,
unselecting R1C1 address. On one of the changes, Excel should offer to
delete the bad names I believe.

--
Regards,
Tom Ogilvy




.
 

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