Controlling Case in Find and Replace

Written by Allen Wyatt (last updated February 13, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


1

Theresa uses Find and Replace often, but cannot seem to control the case of replacements. If she's using uppercase for initials in a draft (i.e., JD), Word uses all uppercase in the replacement (JANE DOE instead of Jane Doe), no matter what she does.

Understanding how Word treats case in replacements is fun. (Well, it can be fun for a Word nerd.) The key to understanding Word's behavior is to make sure that you are always doing the replacements using the Replace tab of the Find and Replace dialog box. The easiest way to display the dialog box (and there are multiple ways) is to simply press Ctrl+H. (See Figure 1.)

Figure 1. The Replace tab of the Find and Replace dialog box.

Chances are good that when you press this shortcut, the dialog box will appear as shown in Figure 1. If so, you'll want to click on the More button. This expands the dialog box, showing more options. (See Figure 2.)

Figure 2. The expanded Replace tab of the Find and Replace dialog box.

This is where you will do your work. Here, in the Find What box, you can type JD in uppercase. Then, in the Replace With box, you would enter Jane Doe, in mixed upper- and lowercase, as desired. If you were to click Replace All at this point, then you would see the behavior that Theresa describes—every instance of JD would be replaced with JANE DOE. (You would also see it if you did the replacement without expanding the dialog box.)

This occurs because Word assumes you want to match the case of what you are replacing, and since JD is uppercase, then what it is replaced with is also uppercase. Interestingly enough, if you had instances of JD in mixed-case or lowercase (as in jd, Jd, or jD), then Word would replace those with Jane Doe, in mixed case, as you desire. It is only when the Find What string is all uppercase that Jane Doe is also converted to all uppercase.

The solution to this is, before clicking Replace All, make sure you turn on the Match Case option, which is clearly visible in Figure 2, above. Doing this forces Word to follow whatever case you used in both the Find What and Replace With boxes. Thus, JD would be replaced with Jane Doe. It also means that if you have instances of JD in mixed- or lowercase in your document (as in jd, Jd, or jD), those would not be matched by replacement in this manner—you would need to do separate, individual replacements for each instance of mixed- or lowercase.

There is one way around this, and it seems to be a quirk of Word—a very handy quirk, as it turns out. When specifying your Find What text, preface JD with a space. Thus, you would be searching for space-J-D, which is three characters. Then, in the Replace With box, similarly preface Jane Doe with a space. Now, make sure the Match Case option is turned off, and then click Replace All.

In this approach, Word considers what you are searching for (" JD") as mixed case, because of the space, which is apparently always considered lowercase. The replacement, then, is done exactly as you specified (" Jane Doe"), with the mixed case maintained. This means that with this approach you could easily replace all mixed-case, lowercase, or uppercase instances of JD (jd, jD, Jd, and JD) with the desired mixed-case name, in a single find and replace operation.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13821) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using Dot Leaders in a Paragraph

Adding dot leaders to your text is easy through the application of tab stops. This tip explains the steps you need to ...

Discover More

Displaying a Live Word Count

You can use Word's built in tools to figure out how many words are in your document. If you want a real-time, constantly ...

Discover More

Margins for All Documents Changing

Have you had the margins in a group of documents change without you knowingly doing anything? This tip explores some ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Changing the Formatting of All Instances of a Word

Need to find all the instances of a particular word and change the formatting of those instances? It's easy to do using ...

Discover More

Copying Found Items to a New Document

Word allows you to use its searching capabilities to easily find multiple items in a document. What if you want to copy ...

Discover More

A Fast Find-Next

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
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 5 - 3?

2021-02-14 06:31:06

Nick Wright

Controlling Case in Find and Replace

You give great advice about changing JD ro John Doe, but the user will have to do this for every document and for each shorthand JD he or she uses.
StyleWriter lets you do multiple changes in each and every subsequent document without doing individual search and replaces. I'm surprised you didn't mention this.


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.