Reply
 
Thread Tools Display Modes
  #1   Report Post  
Brian
 
Posts: n/a
Default Changing 77 777 to 77,777

I have a document in Word 2000 which contains a lot of numbers in the text
(ie not in tables).

The document was written by someone who uses a space as the thousands
separator, instead of a comma. So, for example whereas I would write
"77,777.77", he writes "77 777.77".

This is a problem for various reasons, including that the number can break
across the end of a line. Is there a way of replacing these spaces with
commas globally? I have looked at Search & Replace, but there seems to be no
special character to mean "any single digit".



  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

Brian,

ReplaceMoreUse Wildcards
Find:
([0-9]) ([0-9]{3}[,.])
Replace with
\1\,\2

should work.
--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Brian wrote:
I have a document in Word 2000 which contains a lot of numbers in the
text (ie not in tables).

The document was written by someone who uses a space as the thousands
separator, instead of a comma. So, for example whereas I would write
"77,777.77", he writes "77 777.77".

This is a problem for various reasons, including that the number can
break across the end of a line. Is there a way of replacing these
spaces with commas globally? I have looked at Search & Replace, but
there seems to be no special character to mean "any single digit".



  #3   Report Post  
Greg Maxey
 
Posts: n/a
Default

Brian,

Change the comma in the find string I posted to a space. You may have to
run the routine twice to pick up and format large numbers.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Brian wrote:
I have a document in Word 2000 which contains a lot of numbers in the
text (ie not in tables).

The document was written by someone who uses a space as the thousands
separator, instead of a comma. So, for example whereas I would write
"77,777.77", he writes "77 777.77".

This is a problem for various reasons, including that the number can
break across the end of a line. Is there a way of replacing these
spaces with commas globally? I have looked at Search & Replace, but
there seems to be no special character to mean "any single digit".



  #4   Report Post  
Brian
 
Posts: n/a
Default

Greg,

Thanks for your reply. When I try this, I get the message "The Replace With
text contains a group number which is out of range".

Brian


"Greg Maxey" wrote in message
...
Brian,

Change the comma in the find string I posted to a space. You may have to
run the routine twice to pick up and format large numbers.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Brian wrote:
I have a document in Word 2000 which contains a lot of numbers in the
text (ie not in tables).

The document was written by someone who uses a space as the thousands
separator, instead of a comma. So, for example whereas I would write
"77,777.77", he writes "77 777.77".

This is a problem for various reasons, including that the number can
break across the end of a line. Is there a way of replacing these
spaces with commas globally? I have looked at Search & Replace, but
there seems to be no special character to mean "any single digit".





  #5   Report Post  
Greg
 
Posts: n/a
Default

Brian,

Sorry fo being sloppy,

The Replace with should be

\1,\2

Remove the extra \



  #6   Report Post  
Brian
 
Posts: n/a
Default

Greg,

Word is making 0 replacements with this. I have copied the find and replace
strings I typed he

([0-9]) ([0-9]{3}[ .])

\1,\2



and I'm using it on this file:



77 777.77



77,777.77



I also tried it on the original problem file, with no replacements made.



Brian




"Greg" wrote in message
oups.com...
Brian,

Sorry fo being sloppy,

The Replace with should be

\1,\2

Remove the extra \



  #7   Report Post  
Greg
 
Posts: n/a
Default

Brian,

I just copied the find and replace strings that you posted here and
texted with with 77 777.00 and it worked fine.

Do you have ReplaceMoreSearchAll selected?

Try with your cursor at the start of the document.

You might also try wiping any bad karma from the dialog boxes with:

http://word.mvps.org/FAQs/MacrosVBA/ClearFind.htm

  #8   Report Post  
Brian
 
Posts: n/a
Default

Greg,

Success! I didn't have "Use wildcards" selected.

Many thanks,
Brian

"Greg" wrote in message
oups.com...
Brian,

I just copied the find and replace strings that you posted here and
texted with with 77 777.00 and it worked fine.

Do you have ReplaceMoreSearchAll selected?

Try with your cursor at the start of the document.

You might also try wiping any bad karma from the dialog boxes with:

http://word.mvps.org/FAQs/MacrosVBA/ClearFind.htm



  #9   Report Post  
Greg
 
Posts: n/a
Default

Doh!!

OK. Glad I could help.

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
Help in changing the default summary information for a document Patrick Page Layout 1 April 22nd 05 03:15 AM
why would changing a style modify other styles (not based on each futureknight Page Layout 1 March 14th 05 06:59 PM
Changing an Autotext Entry Gordon New Users 5 February 15th 05 11:01 AM
Help! Word keep changing capitals to lower case Charlotte Hinger Microsoft Word Help 5 January 26th 05 02:23 AM
Page number changing between same version different computer!? Zerotwist Microsoft Word Help 5 January 7th 05 09:02 PM


All times are GMT +1. The time now is 08:52 AM.

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"