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

Reducing Word's CPU Load

A series of options for checking the CPU load of your Word document.

Discover More

Understanding Smart Cut and Paste

Editing is generally made easier by a feature that Word calls smart cut and paste. If you prefer, you can turn the ...

Discover More

Shortcut to Move between Two Worksheets

Moving between to adjacent worksheets is easy; Excel provides a shortcut key to do the trick. If you want to move between ...

Discover More

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!

More WordTips (ribbon)

Easily Finding Superscripts

Word has a powerful Find and Replace capability, but sometimes it can be tricky to figure out exactly how to use it. Here ...

Discover More

Finding and Replacing when Only a Portion of the Text is Superscripted

Finding and replacing text when the text being searched for has mixed formatting can be a challenge. You may, however, ...

Discover More

Replacing with a Subscript

The Find and Replace capabilities of Word are quite powerful. One type of replacing may not seem possible at ...

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 2 + 2?

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.