Written by Allen Wyatt (last updated March 18, 2020)
This tip applies to Word 97, 2000, 2002, and 2003
Even though you cannot be selective in your searching (previous tip), Word can be much more flexible when it comes to actually replacing information. For instance, let's say you have a document in which you have many instances of the characters X45. If you want to find these characters and replace them with a regular X and a superscripted 45, there are several ways you can go about it.
The first method involves a two-step search and replace. You can follow these general steps:
It doesn't take terribly long to do these two steps, and if you need to do them in multiple documents you can automate the process by recording a little macro that does them.
Another way to approach the problem is to create a little macro that does the actual search and replace in one pass of the document. The macro can find all occurrences of X45, select just the 45 part, make it superscript, and then go on to the next occurrence. The following macro does just that:
Sub DoX45()
Dim oRng As Range
With Selection
.HomeKey unit:=wdStory
With .Find
.ClearFormatting
.Forward = True
.text = "X45"
.Execute
While .Found
Set oRng = ActiveDocument.Range _
(Start:=Selection.Range.Start + 1, _
End:=Selection.Range.End)
oRng.Font.Superscript = True
oRng.Start = oRng.End
.Execute
Wend
End With
End With
End Sub
Finally, if you don't particularly care for macros, there is an even easier solution:

Figure 1. The Replace tab of the Find and Replace dialog box.
By following these steps, Word replaces all instances of X45 with the contents of the Clipboard, which happens to be the formatted version you want to use. In other words, your text is formatted in one search and replace operation.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1553) applies to Microsoft Word 97, 2000, 2002, and 2003.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!
When you do a search and replace operation in Word, it is possible that you could inadvertently wipe out a bookmark or ...
Discover MoreWhen writing in non-English languages, there can be many variations of accented characters that are used in a word. You ...
Discover MoreOne of the special characters you can add in a document is the no-width optional break. Although originally designed for ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments