To sort dates in Excel, select a cell in the date column, then choose Data > Sort Oldest to Newest for chronological order or Data > Sort Newest to Oldest for reverse order. If the dates belong to rows of related information, sort the whole table or choose to expand the selection so each row stays together.
What date order means in Excel
Excel can sort dates correctly when it recognizes them as date values rather than ordinary text. A recognized date is stored as a number, even though the cell is displayed in a familiar format such as 3/7/2025 or March 7, 2025. Sorting those underlying values places dates in calendar order, regardless of how they are displayed.
Oldest to Newest means ascending chronological order: the earliest date appears first and the latest last. Newest to Oldest reverses that sequence. The display format does not determine the sort direction. For example, a date shown as 07-Mar-2025 and the same date shown as 3/7/2025 sort together if both cells contain actual date values.
Dates stored as text are different. Text that looks like a date may sort alphabetically or lexically instead of chronologically. That is why a column may appear correct at first glance but put dates such as 12/1/2024 before 2/1/2024. If a normal date sort produces a surprising result, check whether Excel recognizes the entries as dates.
Sort a date column step by step
For a simple list, use Excel’s built-in sort buttons. Click a date cell first; selecting an entire column is usually unnecessary and can create problems if the worksheet has adjacent data.
- Click a cell containing a date in the list or table.
- Open the Data tab.
- Choose Sort Oldest to Newest to put early dates first, or Sort Newest to Oldest to put recent dates first.
- If Excel asks whether to expand the selection, choose Expand the selection when the other columns contain information for the same records.
- Check a few rows to confirm that the dates and their associated details remain together.
For a list with a heading row, Excel often detects the header automatically. If you use the full Sort dialog, open Data > Sort, select the date field under Sort by, choose Cell Values under Sort On, then select Oldest to Newest or Newest to Oldest under Order. Confirm that My data has headers is checked when the first row contains labels such as Due Date or Appointment.
In Excel for the web, the Data tab and table or filter menus provide sorting options; labels and dialog details can vary slightly from the Windows desktop app. On Mac, sorting is also available from the Data tab, though the ribbon layout can differ. The essential choice is still ascending or descending date order.
Keep each record’s information together
A date is often one field in a record that also includes a name, amount, status, or description. Sorting only the date cells can detach dates from their correct details. For instance, if a row contains an invoice date, customer, and balance, moving only the date column would make the worksheet misleading even though the dates themselves look sorted.
When Excel prompts you, choose Expand the selection to sort the connected columns as a unit. If no prompt appears, use the Sort dialog and make sure the selected range includes all columns that belong to the records. A formatted Excel table is a convenient option: click a cell in the table and sort by its date column, and the table’s rows remain intact.
- Include all columns that describe the same record.
- Keep a single header row above the data and avoid blank rows inside the list.
- Before sorting a complicated sheet, save a copy or use Undo if the result is not what you intended.
Undo is Ctrl+Z on Windows and Command+Z on Mac. It is a quick way to reverse a recent sort, but it is better to verify the selected range before sorting, especially if the workbook contains several separate blocks of information.
Sort by date and then by another field
A single sort key is enough when every date should simply be in chronological order. For a more organized list, use a second key to order records that share the same date. For example, you might sort appointments by date and then by start time, or sort invoices by due date and then by customer name.
Open Data > Sort, choose the date column as the first level, and set its order. Select Add Level to add another field, such as Time or Customer, and choose its order as well. Excel applies the first level first; the next level determines the order among rows tied on that first field. Add further levels only when they answer a real sorting need.
Check that the secondary field is appropriate for the result you want. For example, sorting by date and then by a text status will group matching statuses within each date; it will not place all records with the same status together across the whole worksheet. To make status the main grouping, put it at the first sort level and date at the next level.
Fix dates that are stored as text
Several clues can suggest that a date is text: sorting gives an unexpected sequence, the cell has a green error indicator, or changing the number format does not change how the entry appears. Alignment can offer a hint—numbers and dates are often right-aligned by default, while text is often left-aligned—but formatting and manual alignment can make that clue unreliable.
For a consistent column of text dates, Excel for Windows offers a conversion route through Data > Text to Columns. Select the date cells, start the wizard, choose Delimited and continue through the steps without selecting a delimiter that would split the entries. On the final step, set the column data format to Date and choose the order that matches the text, such as MDY or DMY, then select Finish. Check the results before sorting. The wizard’s options and availability can vary by Excel platform and version.
For text written consistently as year-month-day, a helper formula can convert the characters into an Excel date. With the text value 2025-03-07 in cell A2, enter =DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)) in B2. This returns the date March 7, 2025, as a date value; format B2 as a date if it displays as a number. Fill the formula down, then sort using the converted helper column. This formula assumes every entry uses the same four-digit-year, two-digit-month, two-digit-day pattern.
For other text patterns, conversion depends on the exact order and regional conventions. For example, 04/05/2025 can mean April 5 or May 4. Confirm whether the source uses month-day-year or day-month-year before converting; changing a display format alone cannot resolve that ambiguity. Keep the original values until you have verified the converted dates.
Sort by month, year, or time
Chronological sorting uses the full date, including the year. That is right for most schedules and transaction lists. If you want to compare birthdays by month and day regardless of birth year, a normal date sort is not enough: it will prioritize the year first. Create helper columns for the desired parts, then sort by month and day in that order.
With an actual date in A2, enter =MONTH(A2) in a helper cell to return its month number; for a date in March, the result is 3. Add a day helper with =DAY(A2), which returns the day number, such as 7 for March 7. Fill both formulas down, then use Data > Sort to sort first by the month helper and next by the day helper, both smallest to largest. Keep the original date column and the helper columns in the selected range so the rows stay together.
To group by year and then date, sort by the date column normally; chronological order already places years in sequence. If you need a specific grouping layout, such as year first and month second, use helper fields or the full Sort dialog and check the result. Sorting by a displayed month name as text can put months alphabetically—April, August, December—instead of calendar order.
Excel date-time values can also include a time component. A cell formatted to show only the date may hide that component, but the underlying value can still distinguish two entries on the same day. Sorting by the full value orders both the date and the time. If you see what look like duplicate dates in the sorted result, display the time temporarily or inspect the formula bar before assuming Excel has sorted incorrectly.
Choose the right sorting method
The quick sort buttons are usually best for a straightforward, one-column chronological sort. They take fewer steps and are easy to use when Excel has clearly identified the date column and the complete record range. The Sort dialog is better when you need several sort levels, want to confirm that headers are handled correctly, or need a particular field to determine the primary grouping.
Sorting a table is useful for a growing list because the table keeps records structured and offers sorting controls on its column headers. A normal range can also be sorted, but take care to include all related columns. A formula-based sorted copy is another possible approach in supported Excel editions, but it is not necessary for a one-time sort and can be less suitable when you want to rearrange the original records. For most users, the built-in Data tab sort is the clearest choice.
Common date-sorting problems
- Dates sort in an odd sequence: Check for text values, inconsistent formats, or dates interpreted in the wrong regional order. Convert and verify them before sorting again.
- Rows no longer match their dates: Undo immediately, then redo the sort with the full table or range selected. Do not sort a single field when other columns belong to the same records.
- The heading moves into the data: Open the Sort dialog and confirm My data has headers. Also check for blank rows or extra title rows above the actual header.
- Some entries remain at the top or bottom: The column may contain blanks, text, or error values mixed with dates. Inspect those cells and decide how they should be handled before sorting.
- Dates look identical but sort apart: They may include hidden times, or one may be text while another is a real date. Check the underlying values and standardize the column.
Do not assume that applying a date number format converts text into dates. Formatting controls how a value is displayed; it does not necessarily change the value’s underlying type. Convert text values first, then apply a consistent date format if you want the entries to look uniform.
Frequently Asked Questions
How do I sort dates from oldest to newest in Excel?
Click a date cell and choose Data > Sort Oldest to Newest. If the dates are part of records with other columns, expand the selection or sort the whole table.
How do I sort dates from newest to oldest?
Select a date cell and choose Data > Sort Newest to Oldest. This places the latest recognized date first and the earliest last.
Why are my dates sorting alphabetically?
They may be stored as text rather than Excel date values. Convert the text using a method that matches its exact date pattern and regional order, then sort the converted dates.
Can I sort dates without mixing up the other columns?
Yes. Sort the entire data range or an Excel table, not just the date cells. If prompted, choose Expand the selection so each complete row moves together.
How do I sort birthdays by month and day, ignoring the year?
Create helper columns that return the month and day from each real date, then sort first by month and next by day. A standard date sort includes the year and therefore will not produce that year-independent order.
Why do two dates on the same day appear in a particular order?
The cells may contain time values that are not shown by the current format. Excel sorts the full date-time value, so entries on one day can be ordered by time.
Related
- Excel File Too Large for No Reason? Find the Hidden Data
- Excel File Large for No Reason? Causes and Fixes to Try
- Excel Essential Keyboard Shortcuts for Everyday Work
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- How to Create Box File Labels in Word That Fit RightTo create box file labels in Word, measure the label area, set up a page or table to…
- Vlookup with multiple criteria?Learn how to use VLOOKUP with multiple criteria in Excel, build a reliable helper key, avoid common errors,…
- Excel Formula to Round to the Nearest Whole NumberTo round a number in Excel to the nearest whole number, use the ROUND function with zero decimal…
- COUNTIF Examples: Formulas for Common Spreadsheet TasksUse Excel’s COUNTIF function to count cells in one range that meet one condition: =COUNTIF(range,criteria). For example, it…
- Excel SUMIF Less Than: Formula, Examples, and TipsIf the values to test are in A2:A6 and the amounts to add are in B2:B6, use =SUMIF(A2:A6,"<100",B2:B6)…
- Power Query VLOOKUP: Match Data From Another TableYes. In Excel for Microsoft 365, Power Query can look up values in another table by merging the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.