WD: How to Sort Words Separated by a Space

Last reviewed: February 3, 1998
Article ID: Q153671
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a and 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows
  • Microsoft Word 98 Macintosh Edition
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a

SUMMARY

This article describes how to sort information that is separated by spaces, such as a list of names.

MORE INFORMATION

To sort information that is delimited by spaces, follow these steps:

  1. Confirm that each row contains the same number of fields. For example, if you are sorting a list of names and some names include a middle initial while others do not, the sort is not completed correctly.

    NOTE: If you add a non-breaking space between some fields and use the SPACEBAR for others, and then sort on a space, it will only use the space (not the non-breaking space) to sort. For example, if you want to sort on last names, but your data includes honorifics or middle initials, insert non-breaking (CTRL+SHIFT+SPACEBAR) spaces in the following positions:

          Dr.<nonbreaking space>John Smith  (This will sort on the space
    
                                             between John and Smith)
          John Smith<nonbreakingspace>,MD   (This will sort on the space
                                             between John and Smith)
          Johne<nonbreaking space>I. Smith  (This will sort on the space
                                             between I. and Smith)
    
2. Select the list.

  1. On the Table menu, click Sort.

  2. Click Options, select Other, type a space in the text box, and then click OK.

  3. Click OK again.

    NOTE: This closes the Sort Text dialog box which will not list all of the fields to sort by until you reopen the dialog box.

  4. On the Table menu, click Sort.

  5. In the Select By list, select Word 2 (or another field you want to sort by), choose a Type, select Ascending or Descending order, and then click OK.

The list is now sorted by last name.


Additional query words: space delimit delimited blank blanks delimiters 8.0
8.00
Keywords : macword ntword winword word6 word7 word8 word95 word97 kbualink97
Version : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97;MACINTOSH:6.0,6.0.1,6.0.1a,98
Platform : MACINTOSH WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.