How to Sort Dates in Chronological Order in Excel (6 Easy Ways)

The dataset below has data in the Products, Order Date, Delivery Date, and Price columns.

Excel Sort Dates in Chronological Order


Method 1 – Adopting the Sort & Filter Option

Steps:

  • Select the dates that you want to sort in chronological order.
  • Go to the Home tab.
  • From the ribbon, select Editing along with Sort & Filter.
  • Choose your sorting pattern from the available options. I have picked Sort Oldest to Newest.

Adopt Sort & Filter Option

A warning box will appear.

  • Mark the box having Expand the selection.
  • Click on Sort.

We can see the sorted dates in chronological order in the selected cells.

 Excel Sort Dates in Chronological Order

Read More: How to Sort by Date in Excel


Method 2 – Applying the MONTH Function

Steps:

  • Select a cell and enter the following formula:
=MONTH(D5)

Apply MONTH Function

  • Press ENTER.

Excel Sort Dates in Chronological Order

  • Go to the Home tab.
  • From the ribbon, select Editing along with Sort & Filter.
  • Choose your sorting pattern from the available options. I have picked Sort Largest to Smallest.

Excel Sort Dates in Chronological Order

A warning box will appear.

  • Check the box Expand the selection.
  • Click on Sort.

We have the sorted dates in chronological order on the selected cells.

Excel Sort Dates in Chronological Order

Read More: How to Sort Dates in Excel by Year


Method 3 – Employing the TEXT Function

Steps:

  • Create a column (i.e. Month and Day) and input the following formula:
=TEXT(D5, "mm.dd")
  • Press ENTER and AutoFill the rest cells.

Employ TEXT Function

  • Click on Home.
  • Go to Editing along with Sort & Filter from the ribbon.
  • Choose your sorting pattern from the available options. I have picked Sort Z to A.

We can see our desired output on the screen.

 Excel Sort Dates in Chronological Order


Method 4 – Using the YEAR Function

Steps:

  • Select a cell and enter the following formula:
=YEAR(D5)

Use YEAR Function

  • Use Sort & Filter under the Home tab to sort dates according to your preferred chronological order.

I have used the Sort Smallest to Largest order to sort dates.

Excel Sort Dates in Chronological Order

Read More: How to Sort Dates in Excel by Month and Year


Method 5 – Applying the WEEKDAY Function

Steps:

  • Select a cell and enter the following formula:
=WEEKDAY(D5)

Apply WEEKDAY Function

  • Click on Sort & Filter under the Home tab to sort dates according to your preferred chronological order.

I have used the Sort Smallest to Largest order to sort dates.

Excel Sort Dates in Chronological Order


Method 6 – Combining IFERROR, INDEX, MATCH, COUNTIF & ROWS Functions

Steps:

  • Select a cell and enter the following formula:
=IFERROR(INDEX($D$5:$D$11, MATCH(ROWS($D$10:D10), COUNTIF($D$5:$D$11, "<="&$D$5:$D$11), 0)), "")

Combine IFERROR, INDEX, MATCH, COUNTIF & ROWS Functions

  • Press ENTER.

We can see the oldest date in that cell.

  • AutoFill the remaining cells.

Excel Sort Dates in Chronological Order

Read More: How to Sort by Date and Time in Excel


Practice Section

You can practice in the following section.

Practice section


Download the Practice Workbook



<< Go Back to Sort by Date in Excel | Sort in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdullah Al Murad
Md. Abdullah Al Murad

Md. Abdullah Al Murad is a computer engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in C, C++, Python, JavaScript, HTML, SQL, MySQL, PostgreSQL, Microsoft Office, and VBA and goes beyond the basics. He holds a B.Sc. in Computer Science and Engineering from American International University-Bangladesh. He has transitioned into the role of a content developer. Beyond his work, find... Read Full Bio

2 Comments
  1. Sorting the dates using your 6th method with the IFERROR, INDEX, MATCH, COUNTIF & ROWS Functions is intriguing. However I don’t understand why, in your example, the Rows function starts at D10. The column for that table starts at D5 and ends at D11.

    Can you explain your 6th method in alot more detail please? Will this work in Excel versions that are earlier than 365? Will it also sort dates generated by formula in a dynamic table, ie there are empty rows as well.

    • Reply Avatar photo
      Naimul Hasan Arif Nov 5, 2023 at 11:10 AM

      Hello CJ,

      Thanks for your comment. To go into the details of your queries, let me break down the formula for you used in method 6 in a simpler form first.
      The whole formula was:
      =IFERROR(INDEX($D$5:$D$11, MATCH(ROWS($D$10:D10), COUNTIF($D$5:$D$11, “<=”&$D$5:$D$11), 0)), “”)

      Here, the ROWS function counts the number of rows in the defined array.
      ROWS($D$10:D10)1

      The COUNTIF function compares the values in the given range and denotes them with a number based on the position in the smallest to largest order.
      COUNTIF($D$5:$D$11, “<=”&$D$5:$D$11){4;6;1;5;2;3;7}

      The MATCH function compares the values returned by the ROWS & COUNTIF functions and returns the index number of the position of the exact match.
      MATCH(1, COUNTIF($D$5:$D$11, “<=”&$D$5:$D$11), 0))
      MATCH(1, {4;6;1;5;2;3;7})3

      The INDEX function returns the third date value from the defined range in general form.
      INDEX($D$5:$D$11, MATCH(ROWS($D$10:D10), COUNTIF($D$5:$D$11, “<=”&$D$5:$D$11), 0))
      INDEX($D$5:$D$11, 3)43811
      If there is an error in finding a date, the IFERROR function will return a blank cell as an output.

      While applying the ROWS function, I have set a reference point from D10 and also finished the array on D10. That returns the number of row count 1. However, it is not mandatory that you have to set the reference point from D10. You can start from any cell between D5 to D11 but the starting and ending cell reference should be the same in that array. You can apply “ROWS($D$5:D5)” and it will return 1 too which is the same output.

      If I am not wrong, the IFERROR function was introduced in the 2007 Excel version and the INDEX, MATCH, COUNTIF, & ROWS functions are available in the earliest Excel versions too. So, I hope it will work perfectly from the 2007 and the later Excel versions.
      This formula can be applied to a dynamic table. It will automatically sort dates within the given range.

      I hope you have the answers that you were looking for.

      Regards,
      Naimul Hasan Arif

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo