Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorting lists (Word 2000)

    I need help! I have a list of companies (which includes addresses, phones, faxes, etc.). It is about 58 pages long. Everything was just typed without fields. Each company listing is separated by 2 hard returns. How do I sort this mess by province only?
    Thanks.

    Lil

  2. #2
    Lounger
    Join Date
    May 2002
    Location
    Provo, Utah, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Using Table-->Sort you can probably do what you want if there is something to seperate the fields on your list. For instance, if the list has a first name, a last name, and province, there must be something (like a comma or dash) that seperates the fields. The sort command is in the table menu because you usually do this on tables, but it works for regular text to if it is formatted in a way Word can understand.

    If you want, you can do a search and replace to get two paragraph marks in a row replaced by a single paragraph mark to make the conversion to a table easier. (select text then Table-->Convert) Either way, you will need some unique character that seperates the fields because Word can't guess. (You know how angry everyone gets at all the other guessing that Word does about formatting and stuff.)

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Hi Lil:
    Could you attach a small document to your post (with names, etc. changed if needed) so we can see the format. We can't tell from your post where the "province" appears, nor what is its context. There may be a way to sort it, but it's hard to tell from your description.
    Cheers,

  4. #4
    New Lounger
    Join Date
    Jul 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Attached is a shortened version of the list
    Attached Files Attached Files

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 06-Sep-02 10:27. )</P>Hi Lil:
    I've found a way to do it using Find/Replace. However, I won't be able to post it for a couple hours. As Arnold says, "I'll be back"!
    ----------------
    OK, I'm back. There are 5 things that you need to do.

    First, you must go through each item of each page to make sure that they all contain the same number of paragraphs in the same order. This is the most tedious part & there is no way around it. Word has no way of knowing that some items have e.g. a company name and a department & others don't. Also, some entries have a street address & a P.O. box--others don't. You must go through & put in blank paragraph marks for those groups that don't contain everything (or you could omit certain abberant groups & add them in later. When you're finished, each group of items must contain the same number of paragraphs (i.e. the number of lines between each set of double paragraphs) & the only double paragraph marks will be between the groups.

    Secondly, you must modify the groups in such a way that you can place everything into one table, with each column representing a single type of information.

    Thirdly, you will create your table.

    Fourth, you must separate the city-province column into two columns.

    Finally, you can sort on the province column.

    One clean up item to get rid of excess spaces that are before paragraph marks (this document was created in a very poor manner):
    1. Select everything.
    2. Press Ctrl+h to bring up the replace box & without using wildcards:
    Find: ^w^p
    Replace: ^p

    Here are the steps to create the table & sort it:
    1. Turn on the Show/Hide button (the backward pilcro) on the Standard toolbar so you can see all paragraph marks, spaces, etc. & change the view to normal.
    2. Put the between the last space & first letter of the first sentence. Everything to the left of the cursor should be spaces.
    3. Press Ctrl+Shift+F8. The turns on the column extender so you can select a column.
    4. Press Home & the spaces on the first line will be selected. Then press & hold the down arrow (or PgDwn) until the cursor is at the end of the document. The entire column of spaces & nothing else should be selected. This only works well in normal view.
    5. Press delete & all the spaces are gone.
    6. Press Ctrl+H to bring up the replace dialog box. Leave the "Use wildcards" UNchecked.
    7. Find: "^p^p" no quotes
    Replace: "%%%" no quotes, & press Replace All. This removes all the double paragraph marks. The reason I used the %%% mark, is that it wasn't used anywhere in the document.
    8. Find: ^p
    Replace: ^t This replaces the single paragraph marks with tabs, to mark where cells will break.
    9. Find: %%%
    Replace: ^p This replaces where the double paragraphs were with single paragraph marks.
    10. Select everything & go to Table/Convert Text to Table
    11. Choose to separate the text at tab marks & choose OK. Now you have a table with 10-12 columns, depending upon how many paragraphs you had for each group during the tedious part of your project.
    12. Select the column that has city & province (Alt+single click).
    13. Press Ctrl+H (for the replace box) & Using Wildcards
    Find: (*)( )(*) There's a space between the second set of parentheses.
    Replace: 1^t3 This replaces the city space province with city tab province.
    14. Convert the table back to text (separated at tabs), then convert it back to a table, separated by tabs.
    15. Take a break. You earned it. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    This may seem like a long process, but once you set the stage by making sure that each group has the same number of paragraphs & in the same order, these steps should take less than 10 minutes.
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  6. #6
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Hi Lil, hi Phil,

    One quick alternative to remove the spaces is to Select all (Ctrl+A), then center (from the formatting toolbar) and left-adjust.
    (I just learned that trick last week).

    The problem seems that some records have 8, some 9, and some 10 paragraphs. The company including department/street/PO box has 2-4 paragraphs.
    The tedious work to make all records have the same number of paragraphs (so you can convert them into a clean table) can be done with 4 Find/Replaces. It's a rather complicated procedure, too, but beats doing it manually.

    Before you start, remove the leading spaces and insert 2 empty paragraphs at the start (so each record has two of them).

    <table border=1><td>Step 1</td><td>Mark the company name, department, street/PO box with <firm>...</firm> tags</td><td>Wildcards *on*
    Find what: (^13^13)(*)(^13[!^13]@^13[A-Z][0-9][A-Z])
    Replace with: 1<firm>2</firm>3</td><td>Step 2</td><td>Format everything between <firm> and </firm> as bold</td><td>Wildcards *on*,
    Find what: <firm>(*)</firm>
    Replace with: 1 (and Format > Font > bold; or hit Ctrl+Shift+B when in "Replace with")</td><td>Step 3</td><td>Replace the bold paragraph marks with something else. I choose paragraph signs Alt+0182</td><td>Wildcards *off*,
    Find what: ^p ( and Format > Font > bold)Replace with: ^0182</td></table>
    If you've come this far, you can delete double paragraph marks (replace ^p^p with ^p).
    Now you have a nice list with 7 paragraphs in each record, and can select all records (Ctrl+A), and go to "Table > Convert > Text to Table", choose 7 columns, and OK.

    I'm not sure what you want to sort. In "WINNIPEG MB R2J 3T4", is the province "MB", or "R2J 3T4"?

    If the latter, you can sort the table, choosing the third column as the key. Else follow Phil's instruction 12-14 and sort the table.

    When you are done, you can ( Step 4) replace ^0182 with ^p again.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus


    Footnote to Step 1: The company (including department/street/PO box) uses two, three, or four paragraphs.
    You know that right before that, there are always two paragraph marks (^13^13).
    Then comes the company, which we don't know much about, so we match it with (*).
    After the company, there is a paragraph with the city, then one with the province.
    Of those two, the province (R2J 3T4 ...) is easy to match with a wildcard search because it always has a capital letter, followed by a number and another letter (L4V or so), wich can be matched with [A-Z][0-9][A-Z]. The city paragraph will be matched with [!^13]@^13 (any characters except a paragraph mark, followed by a paragraph mark).

    Footnote to Step 2: We want to remove the paragraph marks in the firm/street/PO box. If these paragraph marks are bold, we can find them later.
    We remove the <firm> and </firm> tags in the same step: 1 in the replacement text will only insert the stuff that is in (braces).

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 06-Sep-02 13:54. )</P>Hi Klaus:
    I like your neat idea for formatting a long list of "records" that have been set up carelessly. I enjoy the Find/Replace challenges.

    A couple things. By the way, I knew about the center justify--left justify trick, but I always forget it. When I discovered column selecting a couple of years ago, I was estatic. (Imagine deleting the spaces one line at a time.) <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Did you mean to say that Lil could start with my Step 6, rather than Step 8?
    (Edited to add: You must have changed your original post since I read it, since there's nothing in your new post now about steps 6 or 8.)

    One reason that I told her to fix everything manually is that I was afraid that there would be other jobs later & that she'd need separate fields for FirmName, Department, 2 address lines, etc. But there probably would be a way to separate those combined fields later.

    By the way, I assume you knew, but you can also use Ctrl+B (rather than Ctrl+Shift+[img]/forums/images/smilies/cool.gif[/img] to format the Find or Replace box bold.

    <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>
    P.S. I hope we haven't scared Lil off--she's been kind of quiet. <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  8. #8
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Hi Lil,

    Don't let Phil and me scare you off <img src=/S/flee.gif border=0 alt=flee width=25 height=25> with these long-winded, complicated posts. We mean well, but it's a difficult task for Word (wonder if it would be easier in Excel? but don't know anything about that!).
    If you can't make sense of our tips <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>, just post back and we'll sort it out as painlessly as possible.


    Hi Phil,

    Sorry for changing my post; I quickly noticed that my description didn't mesh with your procedures.
    The shortcuts (Ctrl+B ...) are different in the German version, so I had to work from memory. Thank you for catching it.

    I love Ctrl+Shift+F8 (or Alt+LeftMouseDrag) too. Before Word2000, I often used it to cut text "cells" from "tables" that had been built with tabs and spaces, and paste them into REAL table cells. In Word2000, it's easier to use the table drawing tool.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Hi Klaus:
    I realize we're off topic, but how do you find it easy to change a tabbed columns into a table using the drawing tool? Isn't it easier to select a column, cut 'n paste, rather than draw each row?? Or do you have another <img src=/S/cool.gif border=0 alt=cool width=15 height=15> trick?

  10. #10
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Drawing each row is done pretty quick.

    <font face="Comic Sans MS">1)</font face=comic> Holding the left mouse button and dragging, I first draw a big cell around the whole table, leaving a lot of white space on all sides. The cell shrinks on the top and the sides, so it is smaller in the picture than I originally made it.
    <font face="Comic Sans MS">2)</font face=comic> Then I draw the horizontal lines. If it doesn't work properly the first time, I undo with Ctrl+Z and try again.
    <font face="Comic Sans MS">3)</font face=comic> If all horizontal lines are in place, I do the vertical lines. Paragraph marks at the end of new cells and most spaces and tabs are removed automatically. As you see, some paragraph marks are still there, which I replace with spaces.
    <font face="Comic Sans MS">4)</font face=comic> Also, the table drawing tool has applied a lot of indents, table margins and other undesirable formatting. So I convert the table to text, and back to a table.

    Cases where the "columns" are very close to each other are difficult. Sometimes, it still requires some cutting and pasting of text.
    But usually, this works pretty well. Some "cleaning up" still remains to be done (apply styles and table borders/lines, remove double spaces in the text, ...).

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus
    Attached Images Attached Images

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    WOW. That is reasonably easy. I've stayed away from the "pencil" tool, thinking it was fluff. But I didn't realize it would remove excess tabs. <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

  12. #12
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    I was very sceptical, too. And I wouldn't use the table drawing tool to edit existing tables. Suzanne.S. Barnhill from the Word newsgroups reported "many oddities verging on corruption" in tables edited that way.

    But as long as you convert to text and back to table after using the tool, I assume it is ok.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  13. #13
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Reading, Berkshire, England
    Posts
    199
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Hi You guys
    I feel like a voyeur reading these posts, but I'm learning an great deal from you both. <img src=/S/clever.gif border=0 alt=clever width=15 height=15> , hope you don't mind One <img src=/S/question.gif border=0 alt=question width=15 height=15> Klaus. Why is your post so much wider than all the others?. Is it because you have included a graphic.

  14. #14
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    Klaus,

    Does this also work in Word '97? It's always seemed to me that it should work just like that, but I've never been able to do it. When I draw a big cell, Word puts it before the text, not around it. And if I try to draw a line to divide cells, it disappears when I release the mouse button. Am I doing something really stupid? Do I have something set up incorrectly? Inquiring minds want to know.

    Lin

  15. #15
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting lists (Word 2000)

    > Why is your post so much wider than all the others?

    My picture was too big -- please don't tell the Lounge <img src=/S/cop.gif border=0 alt=cop width=15 height=24>

    <img src=/S/doh.gif border=0 alt=doh width=15 height=15> Klaus

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •