1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Reverse sorting in Word 2003

Discussion in 'Business Applications' started by FLYNNE, Jan 19, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. FLYNNE

    FLYNNE Thread Starter

    Joined:
    Nov 13, 2002
    Messages:
    243
    I wish to sort the following from:-

    Using PowerPoint Notes
    Find out what to do when your notes runneth over.
    January 13, 2006


    Word's Work Menu
    A little-known built-in menu you can add to get at documents you use often.
    January 6, 2006


    A New Tool in the Fight Against Spam
    G-Lock SpamCombat lets you delete spam on the server so it never gets to your hard disk
    December 30, 2005

    to :-

    A New Tool in the Fight Against Spam
    G-Lock SpamCombat lets you delete spam on the server so it never gets to your hard disk
    December 30, 2005

    Word's Work Menu
    A little-known built-in menu you can add to get at documents you use often.
    January 6, 2006

    Using PowerPoint Notes
    Find out what to do when your notes runneth over.
    January 13, 2006

    I have tried using the sort feature in word but the text and dates get sorted into separate piles.

    Regards
     
  2. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    How large is the list?

    chris.
     
  3. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Eww, that's nasty. How large is the list? :D

    I got this far ...

    Pasted into Word. Did a Replace -- Special ("set of 3" manual line breaks with a single paragraph marker).

    Then another Replace -- Special (single manual line breaks with {)

    Then did Convert Text to Table (3 columns, separate at {).

    This put the dates in the 3rd column for sorting by.

    Then I started on Convert Table (back) to Text, but couldn't figure the ALT code for end-of-cell marker. :mad:

    Chris? :confused:
     
  4. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Ahh! Used a caret (^), then replaced those with a manual line break, then doubled up the paragraph markers. Phew!
     
  5. FLYNNE

    FLYNNE Thread Starter

    Joined:
    Nov 13, 2002
    Messages:
    243
    Thank you Bomb #21 and Cristobal 03 for your very prompt replies.

    I wish to apply any solution to this problem for a list exceeding at least 100.

    Regards
     
  6. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Method I posted is something of a shambles, but works after a (brute force) fashion. If you can't get to grips with it, can you upload the file?
     
  7. FLYNNE

    FLYNNE Thread Starter

    Joined:
    Nov 13, 2002
    Messages:
    243
    Hullo Chris

    You are very rapid in answering.

    Bear with me - please can you give me an ordered sequence in answer to my question.

    Regards
     
  8. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Err, I'm Andy. :confused:

    Not sure about "give me an ordered sequence" -- can you go to the chat room for a 1-on-1?
     
  9. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Oops, looks like there's no more chat room. Do you have MSN?
     
  10. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Err, OK. Save your work 1st in case something goes wrong.

    1. Press CTRL+H.

    2. Find & Replace -- Click the "More" button.

    3. Make sure the cursor is in the "Find What" box, and that the box is blank.

    4. Click the "Special" button & choose "Manual line break" -- do this 3 times. It'll look like:

    ^|^|^|

    5. Make sure the cursor is in the "Replace with" box, and that the box is blank.

    6. Click the "Special" button & choose "Paragraph mark" once. It'll look like:

    ^p

    7. Click "Replace All". OK the message for # of replacements, then click "Close".

    OK so far?
     
  11. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    [edit]
    Wow, I'm blind. Ignore the stuff in red.

    Andy, you're doing exactly what I was going to suggest: getting each chunk on one line, then sorting by paragraph. However, one thing I noticed was that there is no apparent logic to the order; in the original post, paragraphs aren't sorted alphabetically or chronologically. So I don't know how to inverse the positions of items in an unsorted list.

    Unless I'm missing something?


    Indeed I was, of course they're sorted chronologically.

    Also, if the list in post #1 originated in Word, what seem to be manual line breaks when you copy/paste out of the post would actually be paragraphs already (seems to explain the behavior, too, since "the text and dates get sorted into separate piles"). I don't know if I explained that very well, I hope it makes sense. Anyway, I was going to replace paragraph marks with delimiters. After that, I was going to replace consecutive delimiters with paragraph marks. At that point, each item should be in a single paragraph. Sort the list ascending or descending, then, after the list was sorted, I'd replace the delimiters with line breaks.

    It's awfully intrusive, and if there's a custom sort order to this stuff, I don't know how you'd do it without just going through it manually.

    chris.

    Will bump some steps presently.
    [/edit]

    [edit 2]
    :confused:

    I had copy/pasted the list in OP to play around with, and in its original form I was right; the list is unsorted...but post #1 isn't marked edited?

    Anyway.
    [/edit 2]
     
  12. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    More steps ...

    8. Do another "Replace", this time replace all manual line breaks with a character that won't be in the doc {~ perhaps).

    9. Hit CTRL+A to select all, then go "Table -- Convert -- Text to Table".

    10. Set number of columns to 3, make sure your character (e.g. ~ ) is in "Other" under "Separate text at". Click OK.

    11. Now you have (well, I do, anyway) a 3 column table with the dates in the 3rd column. Sort the table by that 3rd column (type = "Date") ascending.

    12. With the table still selected, go "Table -- Convert -- Table to Text".

    13. Select "Paragraph marks" for "Separate text with", click OK.

    14. You might want to top & tail by replacing e.g. 2006^p with 2006^l^l -- shouldn't be too arduous.

    HTH,
    Andy
     
  13. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    "Also, if the list in post #1 originated in Word, what seem to be manual line breaks when you copy/paste out of the post would actually be paragraphs already"

    I get manual line breaks Chris -- fingers Xed they'd be there in the 1st place.
     
  14. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    [bump]

    This is mostly Andy's solution. Make a copy of your document and try this on the copy.

    1. Select the text you intend to sort.
    2. From the menu bar, select Edit-->Replace... (or press Ctrl+H).
    3. In the Find and Replace window, under the Replace tab, there are two text fields. In the field labeled Find what, type ^p (the character sequence is Shift + 6, p). In the field labeled Replace with type ~ (a tilde, immediately above the Tab key; hold Shift while pressing this key). If you have any trouble with this step, let me know.
    4. Click Replace All. Since you selected only a certain portion of the document, a prompt will appear asking you if you'd like to search the remainder of the document. Click No.
    5. You should see now your list has been compacted quite a bit. The Find and Replace window will still be open. In the Find what field, type ~~. In the Replace with field, type ^p^p. This will put breaks between each article.
    6. Repeat step 4.
    7. Close the Find and Replace window. At this point, your delimited list should still be selected. From the menu bar, select Table-->Convert-->Text to Table....
    8. In the Convert Text to Table window, under the Table size section, set the Number of columns to 3. Under the Separate text at section, select Other and type a ~ in the field (if it isn't already there). Click OK. Your selected list should now be a three-column table with a row per item.
    9. From the menu bar, click Table-->Sort....
    10. In the Sort window, select Column 3 from the first drop-down combo box. Select Date as the sort's Type, and choose Ascending. Click OK.
    11. Your list ought to be sorted properly now. From the menu bar, select Table-->Convert-->Table To Text....
    12. In the Convert Table to Text window, select Paragraph marks and click OK. This will get you pretty close to your original look. You'll have to go through and manually separate the items of the list.
    I think that's the closest I can get you.

    GL, if you have any questions about this let me know.

    chris.
     
  15. cristobal03

    cristobal03

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    I had to retype the list to confirm my assumption. If the original list was typed in Word, pressing the Enter key for a line break creates a paragraph mark, which is technically different from a manual line break. Just now, testing a sample doc with a mix of the two, they are mutually exclusive, so if the original list was typed in Word, you'd have to replace paragraph marks instead of line breaks.

    Otherwise there is really no difference whatsoever between our suggested solutions.

    Anyway.

    chris.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/435388

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice