Count Occurrences Of A Word In A Document

wordtotalsWord 2007 might show a live word count on the screen, but what if you want to find out how many instances there are of a single word? There's no built-in solution, but you can solve the problem with a simple hack.

I was faced with this problem recently when trying to find how many double discs there were in a list of ripped CDs. I knew each one had the annotation '2CD', but how many were there in the document? Word's own help didn't offer any solace, but a bit of digging soon found a fix courtesy of Tips.Net.

The solution in a nutshell? Do a Replace All for the item you're trying to count, and replace it with the special character ^&, which tells Office to replace the searched item with itself, leaving the document unchanged. At the end of the exercise, Word reports the number of items it has replaced, which equates to the number of occurrences.
replacecount
You could also get the same result by simply replacing something with itself, but this option minimises the risk of a typo in the replace field unexpectedly altering your document. Hit the Tips.net post for some useful macro code if you regularly face this kind of situation.

Generating a Count of Word Occurrences [Tips.Net]


Comments

    There is a built in way to do this, simply open search (ctrl+F) then type the word, then select reading highlight > Highlight all. It will tell you how many words have been highlighted.

    Using the special character can be typoed just as well? Just copy whatever text you are searching for and paste it into the "replace with" field, even better:).

    Well, this tip got me out of a fix, so thanks!

Join the discussion!

Trending Stories Right Now