PC Review


Reply
Thread Tools Rate Thread

Change synthax of workbook-level names in one go

 
 
andreashermle
Guest
Posts: n/a
 
      19th Apr 2010
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
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      19th Apr 2010
Before you do that, try creating a new name that follows that syntax -- maybe in
a test workbook.

andreashermle wrote:
>
> 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


--

Dave Peterson
 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      19th Apr 2010
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

"andreashermle" <(E-Mail Removed)> wrote in message
news:a25336cc-311f-495a-b600-(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set macro security level to 'low level' on opening a certain workbook. andreashermle Microsoft Excel Programming 2 15th Nov 2010 06:33 AM
workbook level name vs worksheet level name =?Utf-8?B?Y2xhcmE=?= Microsoft Excel Programming 1 19th Sep 2007 02:32 PM
how to insert workbook names and worksheet names to access columns =?Utf-8?B?Z29rb3A=?= Microsoft Access Queries 12 31st Aug 2007 03:52 PM
how to copy workbook names and worksheet names to columns in acces =?Utf-8?B?Z29rb3A=?= Microsoft Excel Programming 4 27th Aug 2007 11:26 AM
Why, when I create workbook-level name does it jump it to Sheet-level ? Charles Jordan Microsoft Excel Programming 1 5th Nov 2003 08:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:04 AM.