Sort table by date

uncle
3StarLounger
Posts: 278
Joined: 04 Aug 2010, 19:50

Sort table by date

Post by uncle »

Word 2013 – Would like to sort a 4 column table by date, ascending order. The 4th column has the dates in format
8/14. 12/18, etc.Table won’t sort. Have put “0” in front of single month entries, that didn’t sort either.

Want to keep the data in the other columns to correspond to the dates. Can this be done in one operation?
Many thanks.

User avatar
HansV
Administrator
Posts: 78451
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sort table by date

Post by HansV »

Select the entire table before sorting.
When you click Sort, make sure that you select the 4th column, and select Date as type:
S2813.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

curious
3StarLounger
Posts: 327
Joined: 25 Jan 2010, 17:36

Re: Sort table by date

Post by curious »

yes, Hans. That's what I did and when it didn't sort is when I wrote to the Lounge for help.

Edited: I created a new table and the sort result didn't change for ascending/descending. Sorted by 4th column, date

User avatar
HansV
Administrator
Posts: 78451
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sort table by date

Post by HansV »

Could you attach a small sample document in which sorting the table fails for you?
Best wishes,
Hans

User avatar
DaveA
GoldLounger
Posts: 2599
Joined: 24 Jan 2010, 15:26
Location: Olympia, WA

Re: Sort table by date

Post by DaveA »

If you have any spaces within the date, then remove them and try again.

Dates do not have spaces
I am so far behind, I think I am First :evilgrin:
Genealogy....confusing the dead and annoying the living

uncle
3StarLounger
Posts: 278
Joined: 04 Aug 2010, 19:50

Re: Sort table by date

Post by uncle »

Thanks, but no spaces. WIll post a sample table that won't sort

uncle
3StarLounger
Posts: 278
Joined: 04 Aug 2010, 19:50

Re: Sort table by date

Post by uncle »

Here is a sample table





(sorry for attachment, but using 'table=" didn't align properly, as shown below)
[table=] Genelin, michael Requiem for a gypsy 12/14
Gentry amy Good as gone 7/17
she, Francisco Say Her Name 5/11
[/table]
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78451
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sort table by date

Post by HansV »

Thanks. I did the following:

- Change the system date format to m/d/yyyy (I normally use Dutch format dd-mm-yyyy), since your document contains US dates.
- Open the document.
- Click in the table (anywhere).
- On the Layout tab of the Ribbon, under Table Tools, click Sort.
- Select 'Column 4' from the 'Sort by' dropdown.
- This automatically changed the Type to Date.
- Click OK.

This was the result (1 = before clicking OK, 2 = afterwards):
S2815.png
So it works correctly for me. I'm using Word 2019.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

uncle
3StarLounger
Posts: 278
Joined: 04 Aug 2010, 19:50

Re: Sort table by date

Post by uncle »

Ah, I get it! It's being sorted by month, not year. Is there a way to sort by year(and keeping month)? Am I asking too much for that?

Thank you much

User avatar
HansV
Administrator
Posts: 78451
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sort table by date

Post by HansV »

Do you mean that 12/14 means December 2014?
Best wishes,
Hans

uncle
3StarLounger
Posts: 278
Joined: 04 Aug 2010, 19:50

Re: Sort table by date

Post by uncle »

Yes

User avatar
HansV
Administrator
Posts: 78451
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sort table by date

Post by HansV »

Ah - that explains your problem. I fear that you'll have to write the dates as 5/2011, 7/2017 etc. to make Word recognize the last number as a year.
Best wishes,
Hans

uncle
3StarLounger
Posts: 278
Joined: 04 Aug 2010, 19:50

Re: Sort table by date

Post by uncle »

My thanks for your time, Hans