Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, and 2013. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Replacing a Colon in a Sequence.
by Allen Wyatt
(last updated February 26, 2018)
Anthony wants to use Find and Replace to change a right parenthesis followed by a colon and a digit to a right parenthesis followed by a comma and the letters pp. For instance, "):27" should be changed to "), pp. 27".
One might think that you could simply search for a right parenthesis followed by a colon and replace it with "), pp. ", but that won't work. Actually, it will work, but it might work too well—there could be instances where you have a grammatically correct right parenthesis followed by a colon that you don't want replaced. As mentioned, you only want to replace instances where the colon is followed by a page number.
The best way to do this is through the use of a wildcard search. Follow these steps:
Step 4 is the important part; it defines what you want Word to find. In this case you want to find a right parenthesis, indicated by \), followed by a colon and anywhere from 1 to 3 digits. Note that in the Find What pattern there are parentheses around two separate groups of items: around the right parenthesis and colon and around the digits. The second of these groupings (the digits) are referenced in the Replace With pattern with the \2 element.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13204) applies to Microsoft Word 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Word here: Replacing a Colon in a Sequence.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Word includes two different search engines. Which search engine you choose to use will dictate what Word shows as ...Discover More
Word allows you to search for specific ASCII codes in a document. If you use codes to search for alphabetic characters, ...Discover More
Want a quick, easy way to "search again" for the next occurrence of what you need? Use the technique in this tip and ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.