Please Note:
This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Controlling How Word Sorts Text.

Controlling How Word Sorts Text

If you want to sort a column of words, you always need to deal with Word's very literal way of sorting information, such that punctuation marks sort first, then numbers, then A, B, C, and so on. So, if you put the word "zebra" in quote marks, Word will sort it before words that start with the letter A. In most instances it would be nice if Word could ignore the quote marks and sort zebra in its regular place, with other words beginning with the letter Z.

There is no way to configure Word to do sorting in the way you want, but you can—with a little ingenuity—create a workaround that will get things sorted just as you want them. The basic idea is to use hidden text to place, at the beginning of your word, text that indicates how you want the word actually sorted. Thus, in the case of zebra, you would follow these steps:

Type "zebra", with the quote marks, as you normally would.

Position the insertion point just before the opening quote mark.

Type the word zebra without quote marks. The text should now look like this: zebra"zebra".

Select the unquoted text you typed in step 3.

Press Ctrl+Shift+H.

What happens at this point depends on whether you have hidden text visible within your document. If it is visible, then a dotted underline appears beneath the selected text. If hidden text is not visible, then the word you had selected seems to disappear. (It is still there; it is just hidden.)

The idea from this point is to turn off the display of hidden text when you are ready to print or read your document. You can hide your hidden text by clicking the Show/Hide tool on the Standard toolbar or choose Tools | Options | View tab | Hidden Text. When you are ready to sort, display the hidden text (same method as hiding it) and then do your sort. The sorting then takes the hidden text into account, and your list is sorted as you desire.

This approach of embedding hidden "keywords" into your list is also helpful in those instances where you have a limited number of entries that begin with numbers. For instance, if you have a list entry such as "3 horses" (without the quotes), you may want it sorted as if it were "three horses." Just use the hidden-text method to embed the desired sorting keyword (three horses) at the beginning of the entry.

You can also use this method to force Word to ignore prepositions or conjunctions when doing sorting. For instance, you might want "A Midsummer Night's Dream" to be sorted as if it were "Midsummer Night's Dream." Just embed the desired hidden text at the beginning of the entry, and then use it to do your sorting.

If, at some future time, you actually want to get rid of the hidden-text keywords, you can do so by using Word's Find and Replace feature. Word allows you to search for formatting, including the Hidden attribute, which you can replace with nothing. (How to do such Find and Replace operations has been covered in other issues of WordTips.)

WordTips is your source for cost-effective Microsoft Word training.
(Microsoft Word is the most popular word processing software in the world.)
This tip (147) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Controlling How Word Sorts Text.

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. Learn more about Allen...

MORE FROM ALLEN

Expiration Date for Excel Programs

If you use Excel to create a macro-based application, you may want to make sure that your programs cease working after a ...

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 (menu)

Sorting Single-Column Addresses

Got a document that contains a bunch of addresses? If you want to sort the addresses, then you are in for a surprise because ...

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 8Mpixels. 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.

Source

(gif, jpeg or png only, 5MB maximum file size)

Source

(gif, jpeg or png only, 5MB maximum file size)

Source

(gif, jpeg or png only, 5MB maximum file size)

Notify me about new comments ONLY FOR THIS TIP

Notify me about new comments ANYWHERE ON THIS SITE

Hide my email address

What is eight minus 3?

2016-07-12 14:13:36

Gemma

"I need to sort 'Days Of The Week' into chronological order in Microsoft Word 2013."

I have created a table with days of the week in one column, can you help me, please?