To sort a worksheet by date in Excel for Microsoft 365 on Windows, select a cell in the date column, then choose Data > Sort Oldest to Newest or Data > Sort Newest to Oldest. If Excel asks whether to expand the selection, choose Expand the selection so each date stays with its corresponding row.
What date sorting does
Excel sorts genuine dates by their underlying date values, not by how the dates look on screen. A date such as March 15, 2025, is stored as a number representing a day in Excel’s date system. Date formatting controls whether that value appears as 3/15/2025, 15-Mar-25, or another display style; it does not change the chronological order.
Oldest to Newest places earlier dates first, moving forward in time. Newest to Oldest reverses that order. For example, a column containing February 10, May 3, and January 22 of the same year sorts oldest to newest as January 22, February 10, and May 3. If the dates span multiple years, Excel accounts for the year as well as the month and day.
Sorting usually rearranges entire rows, not just the values in the selected date column. That matters because a date is often linked to a person, invoice, shipment, or event in neighboring columns. Keeping each row intact is essential to preserving those relationships.
Sort a date column and keep its rows together
For a simple list with a header row, use these steps in the Windows desktop version of Excel:
- Click a cell containing a date in the column you want to sort. You generally do not need to highlight the whole column.
- Open the Data tab on the ribbon.
- In the Sort & Filter group, choose Sort Oldest to Newest or Sort Newest to Oldest.
- If a Sort Warning appears, select Expand the selection, then click Sort.
Expanding the selection tells Excel to move the neighboring data along with each date. Choosing Continue with the current selection sorts only the highlighted cells. That can mismatch dates and names or amounts, so use it only when the selected values are intentionally independent of the other columns.
If your data is formatted as an Excel table, click a date-column header’s filter arrow and choose the oldest-to-newest or newest-to-oldest option. Tables include their headers and associated row data in the sort, and the filter arrow also lets you filter the dates without removing records from the workbook.
Use the Sort dialog for more control
The quick commands are convenient when one date column determines the order. For more control, click a cell in the data and choose Data > Sort. In the Sort dialog, select the date field under Sort by, choose Cell Values under Sort On, and select Oldest to Newest or Newest to Oldest under Order. If the first row contains column names, make sure My data has headers is selected.
The dialog supports multiple sort levels. For instance, to group records by department and then list each department’s appointments in date order, add a first level for Department and a second level for Appointment Date. Excel sorts by the first field, then uses the next field to order records tied at the first level. Choose Add Level to create another level, and use the up and down controls to set priority.
Check the selected range before confirming a sort, especially if the worksheet contains blank rows or separate blocks of data. Excel tries to identify a contiguous data region around the active cell, but a blank row can make it treat only part of a larger list as the range. Selecting the full intended range first can help when the worksheet layout is irregular.
Check whether Excel recognizes the values as dates
A value can look like a date but be stored as text. When that happens, Excel may sort it alphabetically or leave it in an order that does not make chronological sense. A common clue is a sequence such as 1/12/2024, 1/2/2024, and 1/3/2024 sorting by character rather than by day. The display alone does not prove that Excel recognizes a value as a date.
One quick check is to select a date cell and look at the formula bar and number format. You can also test a cell in a spare column. With a suspected date in A2, enter =ISNUMBER(A2) in another cell. If A2 contains a genuine Excel date, the result is TRUE because Excel stores the date as a number. If the result is FALSE, the entry may be text; a blank cell or a different kind of value also returns FALSE.
Text dates commonly arise when data is copied from a website, exported from another system, or imported using a different regional convention. The string 3/4/2025 could mean March 4 or 3 April depending on the source’s format. Before converting it, confirm what the original data means rather than assuming Excel’s local date convention matches it.
Convert text dates before sorting
For a column of consistently formatted text dates, Excel’s Text to Columns tool can convert values to dates. First make a copy of the column or workbook if the original text needs to be preserved. Select the date cells, then choose Data > Text to Columns. In the wizard, select Delimited and click Next twice. Under Column data format, choose Date and select the order that matches the source data, such as MDY, DMY, or YMD. Click Finish.
This conversion is only reliable when the chosen date order correctly describes the text. For example, selecting MDY for a DMY source can misread dates or produce errors. If the column mixes formats, includes words, or has ambiguous values, clean and verify the data before converting the whole range. Once converted, apply an appropriate date number format if needed, then sort again.
Changing a cell’s number format to Date is not the same as converting text to a date. Formatting changes how an existing numeric value is displayed; it does not necessarily turn a text string into an Excel date. If a text date remains text after applying a date format, conversion is still required.
Choose the right date order and handle times
Use oldest-to-newest when you want a timeline that moves forward, such as a project schedule, transaction history, or list of birth dates. Newest-to-oldest is useful for reviewing recent activity first, such as the latest support request or payment. The sort direction does not change the dates themselves; it only changes the row order.
If the cells contain both dates and times, Excel sorts by the full underlying value. For example, two entries on the same day are ordered by time when the time is part of each stored value. If you want all records grouped by day regardless of their time, consider adding a separate date-only field or confirming that the source values do not contain times. Formatting a value to hide its time does not remove the time component or prevent it from affecting the sort.
Likewise, displaying dates as month and year does not automatically group them into months for sorting. Excel still sorts the full date values. To sort by year and month while ignoring the day, use a helper field or a suitable multi-level sort based on separate year and month data; do not assume that changing the display format changes the sort rules.
Sort by weekday, month, or another custom order
Chronological order is not always the goal. To arrange a schedule Monday through Sunday, sorting weekday names alphabetically will not produce the desired sequence. In the Sort dialog, use the Order list and choose Custom List when an appropriate list is available. Excel includes built-in lists such as weekdays and months, which can sort names in their conventional order.
For a special sequence, such as priority labels or fiscal periods, you can define a custom list in Excel’s options and use it as the sort order. On Windows, open File > Options > Advanced, scroll to the General section, and choose Edit Custom Lists. Custom lists are useful for sorting labels, but ordinary date values should generally be sorted by date value rather than by a custom text order.
Another option is to create helper columns for separate components such as year, month, or weekday, then sort by those fields in the required order. This is useful when the business rule differs from a normal calendar sort, but document the rule so another person can understand why the displayed order is not strictly chronological.
Common date-sorting problems and fixes
- Only the date column moved: Undo immediately with Ctrl+Z on Windows, then select a date cell and sort again. Choose Expand the selection if Excel displays the warning. On Mac, use Command+Z to undo.
- Dates appear out of order: Check whether some entries are text, whether the source used a different date convention, and whether hidden time values affect the sequence. Convert and verify inconsistent values before sorting again.
- The header was sorted into the records: Open Data > Sort and check My data has headers. For a properly formatted Excel table, use the column’s header filter arrow.
- Some rows did not move: Look for blank rows or columns that may have separated the data into regions. Select the full intended range before sorting, and check for filters or hidden records that affect what is visible.
- Dates look different after sorting: Sorting changes row order, not date formatting. Apply the desired date format to the cells if you want a different appearance.
Sorting can be reversed with Undo if it is the most recent action, but a later edit may make that inconvenient. For important lists, keep a backup or add a stable record ID before sorting. An ID makes it easier to confirm that each record remains intact, particularly when working with imported or manually maintained data.
Excel for Mac and Excel for the web
In Excel for Mac, the same general approach applies: select a date cell and use the sorting commands on the Data tab, or open the Sort dialog for multiple levels. Ribbon placement and dialog appearance can vary slightly by release. Mac keyboard shortcuts differ from Windows; for example, use Command+Z rather than Ctrl+Z to undo. Avoid relying on a Windows Alt-key ribbon sequence on a Mac.
Excel for the web also supports sorting date columns, including the sort choices available from table filter menus. The web interface may place controls differently from the Windows desktop ribbon, and some advanced workbook or custom-list options are more straightforward in the desktop app. If the online version does not expose the setting you need, open the workbook in desktop Excel and use the Sort dialog.
Frequently Asked Questions
How do I sort dates from newest to oldest in Excel?
Select a date cell and choose Data > Sort Newest to Oldest. If prompted, expand the selection so the other cells in each record move with the date.
Why does Excel sort my dates alphabetically?
The entries may be stored as text instead of genuine Excel dates. Check a sample with ISNUMBER in a helper cell, confirm the source’s date convention, and convert the text dates before sorting.
Can I sort dates without separating them from names or other data?
Yes. Sort from a cell within the list and choose Expand the selection if Excel warns you. Sorting an isolated date selection can detach dates from their related row values.
How do I sort dates by month or weekday?
For month names or weekday names, use a suitable custom list in the Sort dialog. For actual date values, use helper fields or multiple sort levels if you need to group by a component such as month rather than follow full chronological order.
Does changing the date format change the sorting order?
No. Formatting changes how a date is displayed, not its underlying value. Excel sorts recognized dates chronologically, including any time component stored with them.
Related
- Excel Day Month Year Format: Dates That Display Clearly
- Excel Not Moving From Cell to Cell? Fixes That Work
- Excel Day of Year: Find the Day Number for Any Date
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Vlookup with multiple criteria?Learn how to use VLOOKUP with multiple criteria in Excel, build a reliable helper key, avoid common errors,…
- XLOOKUP in Excel: Find and Return Data From Another SheetYes. XLOOKUP can search a range on one worksheet and return the matching value from another range on…
- Excel Last Day of Month: Formula and ExamplesTo return the last day of the month for a date in Excel, use =EOMONTH(A2,0), where A2 contains…
- Excel PV Formula for Different PaymentsExcel’s PV function is designed for a fixed payment repeated over a set number of periods, so it…
- Excel Formula Between Two Dates: Count, Sum, or CheckIf dates are in A2:A100, the start date is in D1, and the end date is in E1,…
- How to Merge Names in Excel: Formulas and Flash FillTo combine first and last names in Excel, put the first names in column A and last names…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.