[Solved] Data>Sort: Need it by month without regard to year

Not sure where to post? Post here!

[Solved] Data>Sort: Need it by month without regard to year

Postby HeidiD » Tue Jun 27, 2017 8:29 pm

Hello,
I have a set of data that I'd like to sort by Month, without regard to year. Office only seems to sort by year, ascending or descending, even though I've gone into the Options tab and checked Custom Sort Order and changed that to months. Is it possible to sort by month without regard to year?
Thanks
Attachments
test data set.ods
(13.45 KiB) Downloaded 38 times
Last edited by RoryOF on Tue Jun 27, 2017 11:09 pm, edited 3 times in total.
Open Office 4.1.2
Windows 10 Home
HeidiD
 
Posts: 2
Joined: Tue Jun 27, 2017 8:16 pm

Re: Data->Sort-> Need it by month without regard to year

Postby Zizi64 » Tue Jun 27, 2017 8:50 pm

Use a helper column with the function =Month(), then sort the range based on the helper column.
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.2 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6008
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Data->Sort-> Need it by month without regard to year

Postby HeidiD » Tue Jun 27, 2017 8:54 pm

So you're telling me to go through all 50 lines of data, add a column, type the month from Column B into the new column and then sort?
Open Office 4.1.2
Windows 10 Home
HeidiD
 
Posts: 2
Joined: Tue Jun 27, 2017 8:16 pm

Re: Data->Sort-> Need it by month without regard to year

Postby RoryOF » Tue Jun 27, 2017 8:58 pm

In the first cell of the helper column enter =Month(Address of date column) or whatever the correct syntax is, select that cell, and pull down by the black dot in bottom right corner.
Apache OpenOffice 4.1.4 on Xubuntu 16.04.03 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 25399
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Data->Sort-> Need it by month without regard to year

Postby Zizi64 » Tue Jun 27, 2017 9:03 pm

test data set2.ods
(14.58 KiB) Downloaded 32 times


The range was sorted based on the column D
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.2 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6008
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: "[SOLVED]" Data->Sort-> Need it by month without regard

Postby Villeroy » Tue Jun 27, 2017 10:52 pm

Do you need the next birthday or something?
=DATE((DATE(YEAR(TODAY());MONTH(B1);DAY(B1))<TODAY())+YEAR(TODAY());MONTH(B1);DAY(B1))

the blue part compares this year's B1 date with today's date and returns 1 if it is smaller than today (this year's birthday is today or happened already) or 0 otherwise (this year's birthday is to come). This 0 or 1 is added to the year of this year's B1 date.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24594
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Beginners

Who is online

Users browsing this forum: No registered users and 13 guests