To sort Excel data by date, select the entire table or the date column within it, then choose Data > Sort Oldest to Newest or Data > Sort Newest to Oldest. Keep each record’s related columns in the selected range so names, amounts, and other details move with their dates.
Sort a range or table by date
In Excel for Microsoft 365 on Windows, first check that each row represents one complete record and that the date column has a clear heading, such as Order Date. For a normal cell range, click a cell inside the data, open the Data tab, and choose Sort Oldest to Newest or Sort Newest to Oldest in the Sort & Filter group. Excel usually detects the surrounding data. If it asks whether to expand the selection, choose Expand the selection so the other fields stay attached to their dates.
For more control, select the whole data range and choose Data > Sort. In the Sort dialog, check My data has headers if the first row contains headings. Set Sort by to the date heading, leave Sort On set to Values, and choose the desired order. Select OK to apply the sort. Avoid including a title or notes above the actual table in the selected range.
If the data is an Excel table, click the arrow in the date column’s header and choose Sort Oldest to Newest or Sort Newest to Oldest. Table sorting keeps the records together and normally extends to new rows added to the table. On Mac, the corresponding sorting commands are on the Data tab, and the Sort dialog provides the same basic controls. Excel for the web also has sorting commands on the Data tab; the exact layout can differ from the desktop ribbon.
Keep every record together
The most important safeguard is sorting complete rows rather than rearranging dates by themselves. Imagine columns for Customer, Order Date, and Amount. If you select only the dates and sort them, Excel may warn that data next to the selection exists. Choosing to continue with the current selection can leave dates beside the wrong customers and amounts. The sheet may still look tidy, but the records will no longer be trustworthy.
For a regular range, select all columns and rows that belong to the records before sorting. If Excel displays a prompt, choose Expand the selection. For a table, sorting from a table header is a reliable way to sort the records as a unit. A useful check after sorting is to compare a few rows against a source or another identifying field, especially if the data is important or the range has blank columns that could interrupt Excel’s automatic range detection.
Do not include unrelated content in the range just to make it look larger. A note below the data, a separate summary, or a second table can be moved along with the records if it is included accidentally. If the sheet has multiple blocks of data, select only the block that forms the table you intend to sort.
How Excel recognizes dates
Excel can sort dates chronologically when it recognizes them as date values. Internally, Excel stores a date as a serial number representing a day, and a time is represented as a fraction of a day. The displayed format—such as 11/2/2026, 2-Nov-2026, or November 2, 2026—changes how the value looks, not its underlying chronological position. A date formatted to look different can still sort correctly if Excel has stored it as a real date.
Text that resembles a date is different. For example, an imported value may look like 4/7/2026 but be stored as text. Excel may then sort it alphabetically or group it unexpectedly instead of placing it in true date order. Mixed columns are especially troublesome: some rows may contain recognized dates while others contain text, spaces, or a different date convention. Changing the number format alone does not convert text into a date value; it only changes the display of values Excel can format as dates.
Regional conventions matter when converting imported text. The string 04/07/2026 can mean April 7 or 4 July depending on the source. Before converting it, confirm the source’s month-day order. One option is Data > Text to Columns: follow the prompts, choose the Date option on the final step, and select the source order, such as MDY or DMY, before finishing. Check a few converted results against known dates. Guessing the convention can turn a sorting problem into incorrect data.
Choose the right sort order
Oldest to Newest puts earlier dates first, which is often useful for timelines, appointment schedules, and chronological transaction histories. Newest to Oldest places the most recent dates at the top, a common choice for reviewing recent activity. Neither order changes the date values themselves; it changes the row order on the sheet.
If dates include times, Excel sorts by the full underlying value. For instance, two appointments on the same day can be ordered by their times even when the cells are formatted to display only the date. If you want all entries from one day to appear as a group, that is usually helpful. If you need to inspect the time ordering, apply a format that shows both date and time so the distinction is visible.
Blank cells may appear at one end of a sorted range, and their position can depend on the sort direction and the range’s contents. If blanks are meaningful, consider whether they mean an unknown date, a date not yet assigned, or an inapplicable record. Do not replace them with a made-up date simply to force a preferred display order; that can distort analysis.
Sort by date, then by another field
A single date sort is not always enough. If many records share the same date, a secondary sort can make the results easier to scan without breaking the primary chronological order. Open Data > Sort, choose the date heading as the first level, then choose Add Level and select another heading for the next level. For example, sort first by Appointment Date from oldest to newest, then by Last Name from A to Z.
Sort levels are applied in priority order: Excel groups rows by the first column’s order and uses the next level to order rows within matching values. You can add a third level if there is a genuine need, such as date, then department, then employee name. Keep the date as the first level if chronological order is the main purpose. If you put a text field first, the dates will be chronological only within each text group.
In Excel tables, you can also sort one column and then another using the header menus, but the later sort can replace the earlier sort’s effect. Use the Sort dialog when you need a deliberate hierarchy of multiple fields.
Common date-sorting problems
- Rows separate after sorting: The selected range may have covered only the date column. Undo immediately with Ctrl+Z on Windows or Command+Z on Mac, then select the complete table and sort again.
- Dates sort alphabetically: Some or all values may be text. Check a few cells and convert text dates using the correct source convention before sorting.
- Some rows appear out of place: The column may mix real dates, text dates, blanks, or values with leading spaces. Standardize the values first, then sort and verify the affected rows.
- The heading gets sorted into the records: In the Sort dialog, make sure My data has headers is checked. If using a header menu, start from the table or range’s actual heading row.
- Only part of the table moves: Blank rows or columns can make a data block harder for Excel to detect. Select the exact full range manually, and check for interruptions between its columns.
Undo is useful if you notice a mistake immediately, but it is not a substitute for checking the range before sorting. If a workbook has been edited or saved after the mistake, it may be harder to reconstruct the original row relationships. For complex or high-value records, save a copy before a major reorganization.
Use a formula to show a sorted copy
If you want to preserve the original order and display a sorted result elsewhere, the SORT function can return a dynamic array in Excel for Microsoft 365 and Excel 2021 or later. With records in A2:C4, dates in column B, and rows arranged as Event, Date, and Location, enter the following in an empty cell outside the source range:
=SORT(A2:C4,2,1)
This sorts the full three-column range by its second column, the date, in ascending order. For example, if the dates in B2:B4 are August 14, August 2, and August 9 of the same year, the returned rows appear in the order August 2, August 9, and August 14, with each event and location staying on its original row. The final argument 1 means ascending; use -1 for descending order. Leave enough empty cells below and to the right of the formula for the results to spill. The formula creates a sorted view and does not rearrange the source data.
Frequently Asked Questions
How do I sort dates from newest to oldest in Excel?
Click in the date column or select the full table, then choose Data > Sort Newest to Oldest. For a multi-level sort, open Data > Sort, set the date field as the first level, and choose newest to oldest.
Why is Excel sorting my dates alphabetically?
The values may be text rather than Excel date values, or the column may mix text and real dates. Confirm the source’s date convention, convert the text values to dates, and sort again. Applying a date number format by itself does not convert text.
Can I sort one date column without moving the other columns?
You can, but it usually breaks the relationship between each date and the rest of its record. To keep records accurate, sort the complete table or range. Sort dates alone only when that column is genuinely independent of neighboring data.
How do I sort dates with the same day by time?
If the cells contain actual date-and-time values, Excel sorts by both the day and time. Use the Sort dialog or the date column’s sort command, and display a date-and-time format if you need to see why entries on the same day are in a particular order.
Can I keep my original data order and still see dates sorted?
Yes. In Microsoft 365 or Excel 2021 and later, use SORT in an empty area to create a separate sorted result. It updates when the source values change, while leaving the original rows in place; make sure the result has room to spill.
Related
- Excel SUM: How to Exclude Hidden Rows and Filtered Rows
- Excel: Sum Filtered Rows with SUBTOTAL
- Excel Sum Duplicates: How to Total Repeated Values
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Power Query Custom Column IF Statement: ExamplesTo write an IF statement in a Power Query custom column, use M’s if … then … else…
- Unique in Excel: Get Values Without DuplicatesTo list each value once in Excel for Microsoft 365, enter =UNIQUE(A2:A10) in an empty cell, replacing A2:A10…
- Sumifs with date range?Learn how SUMIFS handles dates, boundaries, months, extra criteria, and common errors, with clear Excel examples to help…
- Show Formulas in Excel: Steps for Windows, Mac, and WebTo show formulas instead of calculated results in Excel, open the Formulas tab and select Show Formulas in…
- Excel SUBSTITUTE Shortcut: Function and Replace KeysExcel has no dedicated keyboard shortcut for the SUBSTITUTE function. To replace text in cells with a formula,…
- Excel Formula to Uppercase the First Letter in CellsTo uppercase only the first character in an Excel cell while leaving the rest unchanged, use =UPPER(LEFT(A2,1))&MID(A2,2,LEN(A2)). If…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.