Tech Support Guy banner
Status
Not open for further replies.
1 - 5 of 5 Posts

·
Registered
Joined
·
84 Posts
Discussion Starter · #1 ·
Using Office, Word, v 7.0.

I want to sort text groups by alphabet.

My document is layed out like this.


Jim
1213
abcd

Fred
2341
addd

Charles
3456
cgfd

Obviously, when I entered the text, I used the enter key and it put in the paragraph after each line of text.

I want it to sort and appear as follows.

Charles
3456
cgfd

Fred
2341
addd

Jim
1213
abcd


Can anybody help?
When I try to follow the help directions, it sorts every line rather than the groupings.

Has to be an easy way, but I've been unable to figure it out.


Thanks

Steve
 

·
Registered
Joined
·
11,755 Posts
If (and only if) you really have exactly 3 lines per person, do the following steps EXACTLY, and you should do ok. Save your file to a new name first, just in case you goof.

Turn your show/hide button on. It looks like a backwards P on your top toolbar. This lets you see all the paragraph returns.

Hit ctrl-h. The find/replace dialog comes up. In the Find what box, type this exactly (lower case Ps):

^p^p

In the Replace with box, type:

^p

Hit Replace all. Then hit OK. Keep hitting replace all and Ok until ZERO replacements are made. Close the find/replace box.

Hit ctrl-home to get to the top of your document. Basically, you should just have one continous list of stuff, with no lines between.

Hit shift-ctrl-end. This should select everything down to the bottom of your document. If there is a paragraph mark BELOW the last line of text, unselect it by holding the shift key and hitting the left arrow key once. We only want the lines and the paragraph return that follows, no extras.

Okay, all lines selected.

Hit Table-Convert text to table. Tell it you're using paragraph returns to delimit your data and you want 3 columns. Hit ok.

If this puts everything as follows:

jim 1213 abcd
fred 2341 addd

then, we're in business. Go ahead and do your sort.
 

·
Registered
Joined
·
84 Posts
Discussion Starter · #3 ·
Dreamboat:

Thanks for the suggestion. Probably won't work easily. I threw you a curve. A number of the entries are 4-5 lines, not just 3.

Hope there is another way to do this. I could erace all the lines over 3, sort and edit, add the eraced lines, or something. Gee I really miss Enable software. Was, IMHO, far superior to Word, and easier to use.

As a federal employee, way back when, I was the last holdout using Enable at our facility.

Thanks.

Steve
 

·
Registered
Joined
·
11,755 Posts
No adding back in. Do this instead:

Make every entry have the exact number of lines. In the below example, put XXX for missing entries. Do what I said above. Now, let's assume the most number of lines is 5. And that the "headings" for these lines are name, address, phone, city, state. If you don't have the address, then that person's set of lines should look like this:

name
XXX
phone
city
state

If you don't have the state, then that person's lines should look like:

name
address
phone
city
XXX

Of course, after entering the first set of XXX, you can copy it (and its paragraph return) to paste in the rest of them.

So, finally, three or four sets will look like this:

name
address
phone
city
XXX
name
XXX
phone
city
state
name
XXX
phone
city
state

or whatever. Then do the Text-to-Columns thing and do 5 columns instead of three. When you're done and it's in a table. Do a find/replace. Put XXX in the find what and don't put anything in the replace with. That'll delete all the XXX entries.

You'll now have a table that you can sort.

Best of all, you'll now have a Word mail merge data source. You can use the mail merge feature to put your data into any format you need: Mailing labels, the kind of list you originally started with, envelopes, letters, etc. You'll need to put column headings on first, so insert a table row above the first row, and type in, for instance, name, address, phone, city, state.

Let me know if you need further help.
 

·
Registered
Joined
·
2,056 Posts
i've always found it easier to use excel for these sort of things

similar method, except you could probably skip the equal sizing of data groups, and use the text to column function
- of course you'd need a unique field separator, similar to what the ^p^p accomplished

after all is sorted, then ship it back to word
- or leave it in excel and use the excel file for your mail merge data source, if that's a function you need
 
1 - 5 of 5 Posts
Status
Not open for further replies.
Top