Change synthax of workbook-level names in one go

A

andreashermle

Dear Experts:

A workbook with several worksheets has numerous workbook-level names,
which all have the following synthax:

_##_###_##_## (e.g. _90_237_44_44)

I would like to run a macro that changes all the above workbook-level
names to the following synthax:

##-###-##-## (e.g. 90-237-44-44). That is the first underscore has to
be dropped, all the other underscores have to be replaced with
hyphens.

Help is much appreciated. Thank you very muc in advance.

Regards, Andreas
 
D

Dave Peterson

Before you do that, try creating a new name that follows that syntax -- maybe in
a test workbook.
 
P

Peter T

Names can't include dashes (or hyphens), and various other illegal
characters.

Depending on the usage of your names, you might be able to create copies of
the originals, following some new format, then do a search & replace of cell
formulas in each sheet to update the new names. Might not be too difficult
programmatically. However Names can be used in other places besides cell
formulas, but only you would know about that.

Before posting back, try doing what I suggested manually with one name,
obviously having saved a backup. If you've only got a handful stick with it.

Regards,
Peter T
 

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