Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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". |
#6
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Doh!!
OK. Glad I could help. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help in changing the default summary information for a document | Page Layout | |||
why would changing a style modify other styles (not based on each | Page Layout | |||
Changing an Autotext Entry | New Users | |||
Help! Word keep changing capitals to lower case | Microsoft Word Help | |||
Page number changing between same version different computer!? | Microsoft Word Help |