I want to sort events of a month with more than two days distance.Can anyone tell me how to do it in libreoffice calc?

I want to sort events of a month with more than two days distance.Can anyone teel me how to do it in libreoffice calc?

The question is unclear in “with more than two days distance” part. What do you mean? You only need to sort events if they have at least that distance? You have data with that property? What difference does the distance make on the sorting process?

The general sorting in Calc (using DataSort) works fine for dates as well.

“The general sorting in Calc (using Data→Sort) works fine for dates as well.”…
…as long as either all of them are numeric spreadsheet dates or all of them are text dates in the same suitable format (best “YYYY-MM-DD”: ISO 8601 extended).

An approach can be with Conditional Formatting.

See LibreOffice Help on Conditional Formatting.

— EDIT: — You can use a column for auxiliary calculations:

  • To show 1 if date falls two days away or more from today, use: =IF(A2>=TODAY()+2;1;"")
  • To show 1 if date falls two days away or more from today, but in the same month, use: =IF(AND(A2>=TODAY()+2;MONTH(A2)=MONTH(TODAY()));1;"")
  • To show 1 if date falls between today and the next two days, use: =IF(AND(A2>=TODAY();A2<=TODAY()+3);1;"")

Tested with LibreOffice 7.0.6.2 (x86); OS: Windows 6.1.


Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.

Check the mark (Answer markCorrect answer mark) to the left of the answer that solves your question.

If the answer helped you, you can mark the up arrow (Upvote mark) that is on the left (to vote, you need to have karma of at least 5).