Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, and 2013. 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: Ignoring Hyphens in Word Counts.

Ignoring Hyphens in Word Counts

by Allen Wyatt
(last updated February 3, 2017)

1

Jayson asked if there was a way to make sure that Word ignored hyphens used in compound words when doing word counts. For instance, he wants Word to count "real-time video" as three words, rather than two. There is no native way to do this in Word. The reason is quite simple—the generally accepted rule is that a compound word is always treated as a single word. For instance, the compound adjective "real-time" is a different word than "real time."

There are three kinds of compound words—the closed form ("firefly"), hyphenated form ("daughter-in-law"), and open form ("post office"). Compound words are often hyphenated to remove ambiguity (i.e., an "old-furniture salesman" clearly deals in old furniture, but an "old furniture salesman" could be an old man. In most contexts you wouldn't have the same problem understanding "used furniture salesman").

Using the example "real-time video," the word count for that phrase should equal two, since "real-time" becomes one word by virtue of the hyphenation. In the sentence, "Talk to your father-in-law," the count should be four words, since "father-in-law" is treated as one word. Counting "father-in-law" as three words would be blatantly incorrect, since you're referring to one person. So, once compound words are closed or hyphenated they are counted as one word. If the compound word is open, e.g., "post office," it is counted as two words.

If you have a particular need to treat compound words as individual words, then the easiest way to do it is to search for the hyphens used to create the compound words and replace them with something that won't affect the word count. When the word count is completed, you can change that "something" back into hyphens. Follow these general steps:

  1. Press Ctrl+H. Word displays the Replace tab of the Find and Replace dialog box.
  2. Click on the More button, if it is available. (See Figure 1.)
  3. Figure 1. The Replace tab of the Find and Replace dialog box.

  4. Make sure the Use Wildcards check box is selected.
  5. In the Find What box, enter the following:
       ([A-z]{2,})-([A-z]{2,})
  • In the Replace With box, enter the following. (Note that there is a space after the one and before the second backslash.)
  •        \1 \2
    
    1. Click on Replace All.
    2. Close the Find and Replace dialog box.
    3. Display the Review tab of the ribbon.
    4. Click the Word Count tool in the Proofing group. Word displays the count of words in your document. (You could, of course, also have looked at the word count shown on the status bar.)
    5. Press Ctrl+Z. Word undoes the find-and-replace operation that you did and your document is back to normal.

    This particular sequence of steps replaces, with a space, any hyphen that is surrounded on each side by two or more letters. Thus, "real-time" would be replaced with "real time," but the dash in "A-7" would not be replaced.

    There is something to realize when adjusting word counts using a method such as this. While it may make sense (to some) to count "real-time video" as three words instead of two, most people would agree that "pre-arranged meeting" should always be counted as two and never as three. In other words, the context in which a hyphen is used can affect whether we treat the words connected by that hyphen as a single compound word or two individual words. Any search-and-replace process, such as that described above, looks solely at the placement of hyphens, not at their context. Thus, the word count derived by the above process would count "pre-arranged meeting" as three words.

    For this very reason, most people accept the idea that compound words are treated as a single word in any word count.

    WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9228) applies to Microsoft Word 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Word here: Ignoring Hyphens in Word Counts.

    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

    Modifying Behavior of the Open Dialog Box

    The Open dialog box is one that few of us think about, but you can control how it behaves with a little bit of macro coding. ...

    Discover More

    Default Numbering Format for Endnotes

    The default format for endnote numbers is lowercase Roman numerals. If you want the numbers to use a different format, such ...

    Discover More

    Setting Column Width in a Macro

    Does your macro need to change the width of some columns in a worksheet? Here's how to do it.

    Discover More

    Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

    More WordTips (ribbon)

    Finding Related Words

    One part of the grammar tools provided with Word is a thesaurus that helps you find all sorts of word variations. One type of ...

    Discover More

    Creating a Master Document Using Existing Subdocuments

    If you decide to create a master document, it is easy to do by just adding one or more subdocuments to an existing document. ...

    Discover More

    Generating a Count of Word Occurrences

    Do you need to know the frequency with which certain words occur in your documents? There is no built-in way to derive this ...

    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}] 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 7 - 1?

    2016-12-29 02:59:51

    Sean Kao

    Hi,

    We're dealing with the problematic word count for very long compound words, for example, 2,8-DICHLORODIBENZO-P-DIOXIN. The word count would be 1 for this very word. However, that word does not look like one word for a translator, who makes a living on that.
    Said example could be easily divided into several parts as in "2, 8- DICHLORO DIBENZO- P-DIOXIN" accounting for six words, or as in "2, 8- DI CHLORO DI BENZO- P- DIOXIN" accounting for eight words.

    This six to eight times or even higher difference is quite a problem in calculating the translation fee. For chemical compounds having long names, the word count seemingly becomes a useless tool.

    Replacing the hyphen with something else only solves part of the problem. We could try to close the gap by replacing various suffixes in additional to the hyphens. Ah... what a tedious thing to do.

    Thank you for reading this. Your comment would be appreciated.

    Happy holidays,

    Sean


    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.

    Newest Tips
    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.