Results 1 to 2 of 2
2009-07-02, 16:40 #1
- Join Date
- Jan 2002
- Houston, Texas, USA
- Thanked 0 Times in 0 Posts
I have a Word 2003 table that needs to be sorted in date order. Some dates are formatted 00/00/000 and some are 03/00/2003. Others include the entire date (i.e., 01/01/2001). I want the dates sorted in ascending order with the 00/00/0000s at the bottom and the /00/ dates sorted in the appropriate month and year. Any thoughts on this??
2009-07-02, 17:11 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Since not all entries are valid dates, Word isn't able to sort them correctly. Someone else may well come up with a solution in Word, but I'd use Excel:
- Format the first column of an Excel worksheet as text.
- Copy the table in Word, then use Edit | Paste Special... with the text option to paste it into the Excel worksheet (starting at A1).
- Enter formulas in B11:
In B1: =RIGHT(A1,4)+9999*(RIGHT(A1,4)="0000")
In C1: =1*LEFT(A1,2)
In D1: =1*MID(A1,4,2)
- The 9999 is used to sort 00/00/0000 at the bottom
- You may have to format the result as General if Excel automatically formats them as text.
- Fill down.
- Click anywhere in the table.
- Select Data | Sort...
- Sort on column B, then column C and finally on column D, with no heading row.
- Copy the data in column A and use Edit | Paste Special... as unformatted text into Word.
See the attached demo workbook.