Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
ElCagle ElCagle is offline
external usenet poster
 
Posts: 1
Default Easier way to change decimal and thousand separators

Am translating a French document into English and having to change tons of
decimal separators (##,## into ##.##) and thousand separators (## ### ###,##
into ##,###,###.##).

There has to be an easy way to automate this. My macro knowledge is very
limited, but even with search and replace there has to be an easier way than
1, 2, 3, ... replace 1. 2. 3. ....

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Easier way to change decimal and thousand separators

On Fri, 14 Mar 2008 16:33:02 -0700, ElCagle
wrote:

Am translating a French document into English and having to change tons of
decimal separators (##,## into ##.##) and thousand separators (## ### ###,##
into ##,###,###.##).

There has to be an easy way to automate this. My macro knowledge is very
limited, but even with search and replace there has to be an easier way than
1, 2, 3, ... replace 1. 2. 3. ....

Thanks for your help


You can use wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm) to do this more easily.

However, you need to do three replacements in order to get it done correctly.
The problem is that if you immediately change all the comma decimal separators
to periods, there won't be any way to tell them apart from the thousand
separators that are periods; if you change all periods in numbers to commas,
that will catch the decimal separators also.

The solution goes like this:

- First change all comma decimal separators to some character that doesn't occur
between digits anywhere else in the document. Let's assume you can use the tilde
(~) for this. So open the Replace dialog, click the More button, and check the
Use Wildcards option. Put this expression in the Find What box:
([0-9]),([0-9])
and put this in the Replace With box:
\1~\2
Click the Replace All button.

- Next change all the period thousand separators to commas. Use this expression
in the Find What (the same as before except change the comma to a period):
([0-9]).([0-9])
and put this in the Replace With box:
\1,\2
Click the Replace All button.

- Finally, change all the tildes to periods. Use this in the Find What:
([0-9])~([0-9])
and put this in the Replace With box:
\1.\2
Click the Replace All button.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default Easier way to change decimal and thousand separators

"Jay Freedman" wrote:

On Fri, 14 Mar 2008 16:33:02 -0700, ElCagle
wrote:

Am translating a French document into English and having to change tons of
decimal separators (##,## into ##.##) and thousand separators (## ### ###,##
into ##,###,###.##).

There has to be an easy way to automate this. My macro knowledge is very
limited, but even with search and replace there has to be an easier way than
1, 2, 3, ... replace 1. 2. 3. ....

Thanks for your help


You can use wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm) to do this more easily.

However, you need to do three replacements in order to get it done correctly.
The problem is that if you immediately change all the comma decimal separators
to periods, there won't be any way to tell them apart from the thousand
separators that are periods; if you change all periods in numbers to commas,
that will catch the decimal separators also.


Hi Jay,

I am not sure I understand, you write: "there won't be any way to tell them
apart from the thousand separators that are periods". But the thousand
separators in French are spaces, and usually, if the document is done right,
unbreakable spaces.

So, you can easily do this in two pases:

([0-9]),([0-9])
\1.\2

and

([0-9])[ ^s]([0-9])
\1,\2

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Easier way to change decimal and thousand separators

On Mon, 17 Mar 2008 06:17:02 -0700, Jean-Guy Marcil
wrote:

"Jay Freedman" wrote:

On Fri, 14 Mar 2008 16:33:02 -0700, ElCagle
wrote:

Am translating a French document into English and having to change tons of
decimal separators (##,## into ##.##) and thousand separators (## ### ###,##
into ##,###,###.##).

There has to be an easy way to automate this. My macro knowledge is very
limited, but even with search and replace there has to be an easier way than
1, 2, 3, ... replace 1. 2. 3. ....

Thanks for your help


You can use wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm) to do this more easily.

However, you need to do three replacements in order to get it done correctly.
The problem is that if you immediately change all the comma decimal separators
to periods, there won't be any way to tell them apart from the thousand
separators that are periods; if you change all periods in numbers to commas,
that will catch the decimal separators also.


Hi Jay,

I am not sure I understand, you write: "there won't be any way to tell them
apart from the thousand separators that are periods". But the thousand
separators in French are spaces, and usually, if the document is done right,
unbreakable spaces.

So, you can easily do this in two pases:

([0-9]),([0-9])
\1.\2

and

([0-9])[ ^s]([0-9])
\1,\2


Thanks, Jean-Guy. Of course you're correct.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you change decimal alignment in tables? RayW Tables 1 October 19th 07 04:56 PM
How do I change/align a number of decimal points? Joanne Schiavoni Tables 2 August 31st 07 05:18 PM
How do I autoformat thousand seperator in Word tables? Mona_LisaJo Tables 0 January 3rd 06 06:54 PM
Please send emails and names of one thousand people to my box Display their names also New Users 4 December 24th 05 03:58 PM
Change a decimal point (.) by coma (,) Thomas Mailmerge 4 February 17th 05 01:59 PM


All times are GMT +1. The time now is 01:20 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"