Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Finding an Unknown Character.

Finding an Unknown Character

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


2

Word documents can contain just about any character you can think of—and many you can't. If you inherit documents from other people, or cut and paste information from other sources, it is possible to end up with characters in Word that you don't know how to identify. If you can't identify them, then it makes it very hard to search and replace them. Sometimes Word will allow you to copy the character and paste it into the Find box when searching, but you can only do this with a limited number of characters.

The answer to this conundrum is to identify, specifically, the character in question. Then you can use the special features of the Find box to locate it. The first step is to create this macro:

Public Sub GetCharASCII()
    MsgBox "CharCode is: " & Asc(Selection)
End Sub

Next, select the single character that you have a question about and run the macro. You will see a dialog box that tells you the ASCII value of the character. For instance, let's say that the character value returned is 148. You would then use the following in the Find box:

^148

Word will now find all instances of the character in question, and you can replace it as desired.

If you still have a stubborn character that this won't work for—for instance, some Unicode characters—then a different approach is required. If you fit into this category, refer to the following article at the Word MVP site:

https://wordmvp.com/FAQs/MacrosVBA/FindReplaceSymbols.htm

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9041) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Finding an Unknown Character.

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

Making Changes in a Group of Workbooks

If you need to change the same data in a large number of workbooks, the task can be daunting. Here are some ideas (and ...

Discover More

Using Excel for Timing

Excel allows you to store times in a worksheet. If you want to use Excel to time certain events, there are a couple of ...

Discover More

Undoing an Edit

We all make mistakes. Fortunately, Excel makes it rather easy to undo your makes, right after you make them.

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)

Removing Sequential Duplicate Words

In some documents it can be critical to locate and remove duplicate words. This tip examines several ways you can ...

Discover More

Adding Half Spaces to Punctuation

Want a little more space just before some of your punctuation characters? You can add that spacing in a variety of ways, ...

Discover More

Text Doesn't Wrap at Margin in Draft View

If you are using Word in Draft view, and the text on the screen doesn't wrap at the right margin like it should, the ...

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-05-12 07:46:14

Timothy Barton

This is very helpful. However, I've noticed that both the hyphen and the minus are both identified as character 45, even though both appear very differently on the screen. These are the two chracters: −-

The macro identifies both as character 45. Do you know why?


2021-02-17 10:41:11

Pirooz

Hi, Very good and Thanks a lot. It was a nice solution for me.


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.