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

Changes to Toolbars aren't Persistent

If you make changes to a toolbar in Word, you expect those changes to be available the next time you start the program. ...

Discover More

Keeping the Flash Drive Occupied

Working on a document stored on a flash drive can have some unintended consequences. Here's some help in understanding ...

Discover More

Default Cell Movement when Deleting

Delete a cell or a range of cells, and Excel needs to figure out how to rearrange the void left by the deletion. You can ...

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)

Searching for Special Characters

When using the Find and Replace feature of Word, you can search for more than plain text. You can also search for ...

Discover More

Protecting Document Areas from Global Replacements

You may have boilerplate text that you need to include in your document, and it would be detrimental to accidently change ...

Discover More

Keeping a Replace Operation Displayed

The Find and Replace tool is designed to help you find and replace information as quickly as possible. However, you may ...

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 two more 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.