find replace function for numbers in word
Thread poster: monitor
monitor
monitor  Identity Verified
Local time: 01:26
English to German
+ ...
Sep 6, 2009

I am desperately looking for a solution to find replace English commas with points and vice versa in a large word document.
The problem is that there are large numbers with 9 numbers and 2 decimals as well as percent numbers with only 4 numbers.
I was unable to locate the correct "replace with" wildcards in order to leave the original numbers unchanged and just replace the commas/points.
Any help very welcome as the client insists that we have to do this in order to get the job
... See more
I am desperately looking for a solution to find replace English commas with points and vice versa in a large word document.
The problem is that there are large numbers with 9 numbers and 2 decimals as well as percent numbers with only 4 numbers.
I was unable to locate the correct "replace with" wildcards in order to leave the original numbers unchanged and just replace the commas/points.
Any help very welcome as the client insists that we have to do this in order to get the job and others to come.
Kind regards
Marcel
Collapse


 
Heinrich Pesch
Heinrich Pesch  Identity Verified
Finland
Local time: 02:26
Member (2003)
Finnish to German
+ ...
Try this Sep 6, 2009

http://accurapid.com/Journal/15msw.htm

REmember to select Use wildcards, otherwise it does not work.

Regards
Heinrich


 
Endre Both
Endre Both  Identity Verified
Germany
Local time: 01:26
English to German
Wildcards in Word Sep 6, 2009

Find what:
([0-9]),([0-9])

Replace with:
\1.\2

This replaces all commas between two numbers with a dot. Inverse comma and dot to do it the other way around.


 
Adam Łobatiuk
Adam Łobatiuk  Identity Verified
Poland
Local time: 01:26
Member (2009)
English to Polish
+ ...
Small correction Sep 6, 2009

Endre Both wrote:

Replace with:
\\1.\\2


FTFY

[Edited at 2009-09-06 11:01 GMT]


 
Endre Both
Endre Both  Identity Verified
Germany
Local time: 01:26
English to German
Thanks for the correction, Adam Sep 6, 2009

In the preview it all looked fine, but then ProZ.com’s forum software ran away with my two backslashes. To make sure, I'll try it again: \1 \2

...and sure enough, the backslashes are gone. I'll submit a support request to bring preview and final view in line.

[Módosítva: 2009-09-06 14:04 GMT]


 
Jaroslaw Michalak
Jaroslaw Michalak  Identity Verified
Poland
Local time: 01:26
Member (2004)
English to Polish
SITE LOCALIZER
Hmm... Sep 6, 2009

The only problem with Endre's solution is that when you change all commas to dots, you can no longer distinguish which dots should be changed to commas... If you start with:

1.000,01

and change it as Endre suggests, you end up with:

1.000.01

Obviously, you cannot change the dots to commas now, as you'll get:

1,000,01

which is not what you want...

The easiest way is to use a placeholder, e.g.:

... See more
The only problem with Endre's solution is that when you change all commas to dots, you can no longer distinguish which dots should be changed to commas... If you start with:

1.000,01

and change it as Endre suggests, you end up with:

1.000.01

Obviously, you cannot change the dots to commas now, as you'll get:

1,000,01

which is not what you want...

The easiest way is to use a placeholder, e.g.:

([0-9]),([0-9]) to \\1###\\2

then

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

and

### to \\1.\\2

You can work around this using the number of digits, but then you must know that the number of decimal places in text is fixed (e.g. always two digits after the decimal point).
Collapse


 
Endre Both
Endre Both  Identity Verified
Germany
Local time: 01:26
English to German
Changing back and forth in the same document? Sep 6, 2009

Jabberwock wrote:
The only problem with Endre's solution is that when you change all commas to dots, you can no longer distinguish which dots should be changed to commas...


I assumed that in one document, the change always goes in one direction only. I have some difficulty imagining a scenario where this would not be the case, maybe the OP could clarify.


 
Daniel Grau
Daniel Grau  Identity Verified
Argentina
Member (2008)
English to Spanish
Jabberwock is right Sep 6, 2009

If you want to swap points to commas and commas to points, you need an intermediate replacement:

1) Commas to placeholder: 1,000.00 becomes 1###000.00
2) Periods to commas: 1###000.00 becomes 1###000,00
3) Placeholders to periods: 1###000,00 becomes 1.000,00

Otherwise you would eliminate all commas with the first replacement:

1) Commas to periods: 1,000.00 becomes 1.000.00
2) Periods to commas: 1.000.00 becomes 1,000,00

Regard
... See more
If you want to swap points to commas and commas to points, you need an intermediate replacement:

1) Commas to placeholder: 1,000.00 becomes 1###000.00
2) Periods to commas: 1###000.00 becomes 1###000,00
3) Placeholders to periods: 1###000,00 becomes 1.000,00

Otherwise you would eliminate all commas with the first replacement:

1) Commas to periods: 1,000.00 becomes 1.000.00
2) Periods to commas: 1.000.00 becomes 1,000,00

Regards,

Daniel
Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

find replace function for numbers in word






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »