Image: Using the Sort command in Microsoft Word
Using line breaks, this list will sort correctly
R E L A T E D   C O N T E N T
ADVERTISEMENT

Hands on: Using the Sort command

Organise your paragraphs; plus a word on headers and footers

Tim Nott, Personal Computer World 23 Mar 2006
ADVERTISEMENT

Although the Sort command appears in Microsoft Word’s Table menu, its use is not confined to tables.

If you have created a list of addresses, or a glossary, by appending entries over time and you want to get this into alphabetical order, going to Table, Sort, will automatically select the whole document.

If you only want part of the document sorted, select this before going to Table, Sort. In the ‘Sort text’ dialogue, choose ‘Paragraphs’ to sort by, ‘Text’ as the type and ‘Ascending’ as the order. Hit the OK button and one of two things will happen.

If each entry consists of a single paragraph, for instance:
‘Dog: Hairy quadruped that can be kept as a pet or trained for work such as guard duty or herding sheep’
then your list should be sorted correctly by the first word – Aardvark, Bat, Cat, Dog and so on.

But if each entry consists of more than one paragraph, such as:
Dogg, Dougal
32 Canine Crescent
Kenilworth
the addresses will get jumbled – all the lines beginning with numbers will be placed at the top, followed by an alphabetic list of all the names, towns and so on mixed in together.

You can Edit, Undo a sort, but a better way it is to use manual line breaks (Shift & Enter) rather than paragraph marks (Enter) within the body of each entry.

Although (depending on paragraph spacing) the effect looks the same, if you turn on the view of formatting marks (Tools, Options, View) you’ll find paragraphs are terminated with the backwards-P symbol (¶), and line breaks show as a bent arrow.
If you’ve already made your entries using paragraph marks, then this isn’t too hard to put right, and draws on our recent sorties into Search and Replace.

First make sure each address or entry is separated from the next by a blank paragraph; that is, you have pressed Enter twice after each one.

Search and replace all occurrences of two paragraph marks (you can type ^p^p in the ‘Find what’ box or click the ‘More’ button and choose ‘Paragraph mark’ twice from the ‘Special’ list).

In the ‘Replace with’ box, type any character combination that doesn’t appear in the document, for example @@@ – this is just a temporary marker. Replace all.

Now replace all single paragraph marks with ‘Manual line break’ from the ‘Special’ list (or type ^l). Finally, replace all your temporary markers with single paragraph marks.
Things can get a little trickier if you really need to use paragraphs within each entry. For example, you might have a heading for each entry, followed by one or more paragraphs, such as:
Dog (Canis lupus familiaris)
The dog is a canine mammal of the order Carnivora etc…
Dogs have been kept as pets for many thousand years etc...
Working dogs can be trained to herd sheep etc…

In this case you need to impose some style discipline. Give every heading an appropriate style, such as Heading 2 (and check that the style has a corresponding outline level), and the following content for each entry is given a style such as Normal or Body Text.

Now switch to Outline view, and you’ll see each entry heading has a plus sign beside it and the entry body paragraphs are indented below this. Select all the entries and perform the sort, and the headings and body stay together.


All Software Applications
Tags: Word Processing

Like this story? Spread the news by clicking below:

Post this to Delicious del.icio.us    Post this to Digg Digg this    Post this to reddit reddit!

Permalink for this story
R E A D E R   C O M M E N T S
M A R K E T P L A C E
Get your free demo of Numara Track-It! 8 - the leading help desk solution for IT related issues.
Make presentations, review documents & share your entire desktop. 30-day free trial! (cc required).
Discover how remote support can fuel your IT business in ways you've never thought of before.
Apply ITIL best practices at your service desk while eliminating integration cost. Learn more here.
WAN based, automated, daily vulnerability assessments. Click here to try and request our whitepapers.
Have your product or service listed here >   
Sponsored links
F E A T U R E D   J O B S
Welwyn Garden City, Hertfordshire, United Kingdom | Tesco.com
Affiliate & Media marketing manager - Welwyn Garden CityWho's behind the world's most successful online retailer? Just over 10 years ago we started Tesco.com (aka Dotcom). Today, we've an incredible 750,000 active customers and sales ... more >
United Kingdom | ESRC
Web/Project Manager - £33,118 to £35,694 + Benefits Cutting-edge research is our business. You'll give us the cutting-edge web technologies to match. The Economic and Social Research Council is the UK's leading research agency for ... more >
Solihull, United Kingdom | Enzen Global Limited
Business Analyst - £30,000 - £35,000 - Solihull We are in need of a Business Analyst with strong analytical skills and a penchant for learning the domain knowledge of the Utilities sector (Gas industry in ... more >
United Kingdom | Advent Computer Training
Are you stuck in a dead end job? Do you want to take control of your salary, life and career? Advent IT and computer training offers advanced, professional training and helps you find the right ... more >
More job opportunities