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

Concise Directory of Available Symbols

Need to know what the different codes are that you can use with the Alt key, along with the characters resulting from ...

Discover More

Using the CONCATENATE Worksheet Function

The process of combining string (text) values to make a new string is called concatenation. Excel provides the ...

Discover More

Reordering Last Name and First Name

If you've got a list of names in a column, you may want to change the order of each name. For instance, the name have the ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Replacing the Space between the Last Two Words of Each Paragraph

Some replacement tasks can seem daunting, but Word provides some great tools for making just about any replacement you ...

Discover More

Changing European Dates to US Dates

Want to change the order of the day and month in a date? This tip shows you how you can do so using the Find and Replace ...

Discover More

Replacing Multiple Spaces with Tabs

If you get a document or some text that has multiple consecutive spaces used to align information, you'll undoubtedly be ...

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 four less than 7?

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.