Advanced Find and Replace
Question : I am trying to find the right formula for the find and replace option in Word, for instance: $45.00 into 45,00 $.
anonymous
Answer : The help for find and replace in Word does cover this but not in a way that is easy to follow. First off you need to have wildcards turned on for the find and replace in order to be able to match any dollar amount and not just the specific value shown. We next need to look at what wildcard definition will match what we are after and how to reorganise the pieces to create the desired result.
What is needed to match the first format and make each part available to use in the replace is as follows:
Find What: ($)([0-9]{1,}).([0-9]{2})
To generate the output in the desired format you then use:
Replace With: \2,\3 \1
Now to explain how this works.
- [0-9]{1,} matches one or more characters that are in the range 0 through 9 (that is any number of digits that make up a number).
- [0-9]{2} specifically matches two characters that must both be in the range 0 through 9 (ie. 00 through 99)
- The () around the various parts makes those pieces available for use in the replacement field
- All other characters represent themselves.
The only special characters for the replacement field are the numbers preceded by a slosh (sometimes called a backslash) which represent the pieces of the find string wrapped in () in the order that they appear in the find string.
Related Articles
- Put Yourself in the Picture
- AutoText
- Headers and Footers in StarWriter
- Bookmarks in Word
- Desktop Publishing Help



