Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to Sort by Date in Excel?

  • Last Updated : 06 Sep, 2021

Excel is providing various types of sorting formats e.g. “sort A to Z”, “Sort Z to A”, “Sort by color” and “Sort by date” etc. Sorting in Excel is nothing but arranging data into some meaningful order to make it easier to understand, analyze or visualize. 

Sort by Date

Chronological or reverse chronological order is the easiest way to sort data by date. This sorts the data in ascending or descending order. In Excel, must have the dates in one single format to sort the data by date otherwise they do not correctly work always.

Attention reader! Don’t stop learning now. If you are an Excel beginner (or an intermediate) and want to learn Excel, Geeksforgeeks brings the perfect course for you to start, Diving Into Excel

To sorting the dates in chronological order follow the below steps:

Step 1:  Select the dates which you want to sort in ascending or descending order.



Step 2: Click Home tab >click on the arrow under Sort & Filter, and then click Sort Oldest to Newest.

As a result, data is sorted from oldest to newest.

Step 3:  If you want to sort dates from Newest to Oldest, then Click Home tab >click on the arrow under Sort & Filter, and then click Sort Newest to Oldest.

As a result, data is sorted by newest to oldest.

Sort by Month in Excel

If you want to sort dates by month, ignoring the year, then you have to add a helper column, extract the month number, and sort by that column because the default Excel sort feature always considers the year.



You can use the “MONTH” function to get a month from the date.

Syntax:

=MONTH (serial_number)

Now follow the below steps to sort by month in Excel:

Step 1: Extract the month number from the date column.

In the above example, the month number is extracted from the “date of birth” column by using the =MONTH(D3) formula:

Step 2: Sort the table by the Month column, select the month range which you want to sort. Then Click Home tab >click on the arrow under Sort & Filter, and then click Sort Smallest to Largest.

As a result, data is sorted by month smallest to largest.

Sort by Month and Day  in Excel

Excel TEXT functions are assisting for it. It converts a date into a text string in the specified format. For our function, the “mm-dd” format code will work.



Syntax:

=Text(Value, format_text)

Now follow the below steps to sort the by Month and day in Excel: 

Step 1: Extract the month and day from the date column.

In the above example, the “month and date” is extracted from the “date of birth” column by using the =TEXT(D3,”mm-dd”) formula:

Step 2: Sort the table by the Month and Day column, select the Month and Day column range which you want to sort. Then Click Home tab >click on the arrow under Sort & Filter, and then click Sort Z to A.

As a result, data is now sorted by “month and day”, largest to smallest.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!