When Excel sorts dates into the wrong order, the usual cause is that some entries are stored as text rather than as real dates, or the sort includes the wrong cells. Check the values and sort range first; if dates are text, convert them to genuine dates before sorting from oldest to newest.
Why Excel dates can appear out of order
Excel stores a genuine date as a number: the number represents a day in its date system, and a time is stored as a fraction of a day. The cell’s number format makes that value appear as a calendar date, such as 3/4/2025. Because the underlying values are numbers, Excel can sort genuine dates chronologically even when they are displayed in different date formats.
Text that merely looks like a date is different. It may have been entered with a leading apostrophe, imported from a text file, or interpreted incorrectly because its day and month order did not match the computer’s regional settings. Excel may sort text alphabetically or according to text rules, not by calendar date. A column mixing true dates and text dates can therefore produce a result that looks partly right and partly wrong.
There are other possible causes, too: a sort may include only one column instead of the whole record, a header may be treated as data, or a time component may make two dates appear identical while their actual values differ. Identifying which problem applies is more useful than repeatedly clicking the sort button.
First check: are the entries real dates?
Start with a suspicious cell. Select it and inspect the formula bar and the number format shown on the Home tab. Changing the format to a date can make a numeric date serial display as a date, but formatting alone does not convert text into a real date. If a value remains text, applying a date format will not make it sortable as a calendar date.
- Try changing the cell’s number format to General. A genuine date will usually appear as a number; a text entry will remain visible as text.
- Look for inconsistent alignment, though alignment is only a clue. Excel commonly right-aligns numbers and dates and left-aligns text by default, but manual formatting can change alignment.
- Check a few entries from different parts of the column, especially dates that came from another system or were pasted in.
- Look for a green error indicator or a warning icon. If Excel offers Convert to Number for a selected cell, that can help with some text values, but verify the result afterward.
Do not rely on appearance alone. The same display, such as 04/05/2025, can represent different calendar dates under different regional conventions. When the source data is ambiguous, confirm whether it means April 5 or May 4 before converting it.
Convert text dates into usable dates
For a small number of cells, editing and re-entering a date in an unambiguous format that Excel recognizes can be simplest. For a larger imported column, select it and choose Data > Text to Columns. In the wizard, leave the data delimited as appropriate for the source, proceed to the final step, and set the column data format to Date. Select the order that matches the source, such as MDY or DMY, then finish. Check several converted cells before sorting.
Another option is a helper column that constructs a date from separate year, month, and day fields. With the year in B2, month number in C2, and day in D2, enter =DATE(B2,C2,D2). For B2 = 2025, C2 = 3, and D2 = 4, the result is March 4, 2025; apply a date number format if Excel displays the serial number. This method is useful when the components are already separated and correctly identified.
Excel’s DATEVALUE function can convert many date strings, but its interpretation can depend on regional settings and the text format. It is not a safe universal fix for ambiguous values such as 03/04/2025. For a large file, use a conversion method that explicitly matches the source order, and compare the converted results against known examples. Keep the original data until you have confirmed that the dates are correct.
Sort the full data range correctly
If dates are real dates, make sure the sort includes the rows and columns that belong together. Sorting just the date column can detach each date from its customer, amount, or description. With a normal range, select a cell in the data and choose Data > Sort. In the Sort dialog, choose the date column under Sort by, select Cell Values, and choose Oldest to Newest. If the range has headers, make sure My data has headers is selected.
When Excel asks whether to expand the selection, choose Expand the selection if adjacent columns contain matching records. Choosing Continue with the current selection sorts only the selected cells and can scramble the relationship between columns. For data formatted as an Excel table, selecting a date column’s filter arrow and choosing Sort Oldest to Newest sorts the table rows together.
- Click inside the dataset and open Data > Sort.
- Confirm that the full table or range is included and identify the correct date field.
- Mark the header option if the first row contains field names.
- Choose Oldest to Newest, then inspect the first and last few rows to confirm the result.
On Excel for Mac, the Data tab also provides sorting controls, though the ribbon layout can differ slightly by version and window size. Excel for the web offers sorting from the Data tab and table filter menus. In any version, the important checks are the same: sort the whole record, identify the header correctly, and verify the date values.
Using the SORT function instead of the sort command
The worksheet function SORT creates a sorted result in another range; it does not rearrange the original data. In Microsoft 365 for Windows, with genuine dates in A2:A5 and no header in that range, enter =SORT(A2:A5,1,1) in an empty cell. The formula sorts by the first column in ascending order. If A2:A5 contains March 4, January 10, February 1, and December 31 of 2025, the spilled result is January 10, February 1, March 4, and December 31, 2025.
SORT can sort text values too, but text that resembles dates is not thereby converted into dates. If a list contains text strings such as 12/01/2025 and 02/15/2025, a text sort may not match chronological order. Convert the source values first, then use SORT. The SORT function is available in Microsoft 365 and Excel 2021 or later; older perpetual versions may not support it. The Data tab’s sort command remains an option where the function is unavailable.
Common causes beyond text dates
- Mixed date conventions: A source may contain both month/day/year and day/month/year entries. A value can be converted successfully but still become the wrong date if Excel assumes the wrong order.
- Times hidden by formatting: Two cells may both display 6/1/2025, while one contains 9:00 a.m. and the other 3:00 p.m. Sorting uses the full date-and-time values, so the displayed dates can look tied even though the rows have a definite order.
- Blanks and unusual values: Empty cells, errors, or labels mixed into a date column can affect where values appear. Check what those cells contain and whether they are meant to be part of the sorted data.
- Partial selection: Selecting a single column instead of the full range can separate dates from their related information. Use the Sort dialog or an Excel table to sort complete records.
- Header confusion: If the header is included as a data value, it may move into the sorted list. Set the header option correctly and use a clear column name.
Also distinguish a display issue from a sorting issue. Excel may store a date correctly while showing it in a format that looks unfamiliar, such as a different month/day order or a serial number. Apply an appropriate date format to check the display, but remember that a number format changes how a value looks, not what value it contains.
How to diagnose a stubborn date column
When the cause is unclear, work on a copy of the worksheet or duplicate the column before making bulk changes. First test several cells, including the earliest-looking and latest-looking entries. Then inspect the source: was it typed by a person, copied from a web page, exported from a database, or opened from a CSV file? Knowing the source often reveals whether the dates are ambiguous text or contain hidden time values.
Next, compare the values with a known calendar. If dates should cover one year, check whether the first and last results make sense and whether month and day were reversed in any records. If multiple columns form each record, sort the full range and confirm that a distinctive name or ID stays with its original date. For time-sensitive records, temporarily display both date and time so that hidden differences become visible.
After conversion, sort again and verify the result at both ends and around any entries that previously appeared misplaced. If the data is refreshed regularly, fix the import or data-cleaning process rather than repeating a manual conversion each time. For example, consistently importing a date column with the source’s known DMY order is safer than relying on automatic interpretation.
Frequently Asked Questions
Why does Excel sort dates alphabetically?
Excel is likely treating some or all of the entries as text. Convert them to genuine dates using a method that matches the source’s date order, then sort the full range by that column.
Why are dates out of order even though they look the same?
The cells may contain hidden times, different underlying values, or a mix of real dates and text. Display the full date and time where relevant, and inspect the cell values rather than relying only on their appearance.
Will changing the cell format fix dates stored as text?
No. A number format changes how a real numeric date is displayed; it does not reliably convert text into a date. Use a conversion method such as Text to Columns with the correct date order, and confirm the output.
Why did sorting my dates move the wrong information?
The sort may have applied to only the date cells instead of the complete rows. Undo immediately if possible, then sort the entire data range or use the table’s sort control so each record stays together.
Can Excel sort dates that include times?
Yes. Excel sorts by the complete date-and-time value. If the time is hidden by the number format, entries that look like the same date can still sort into a definite order.
Does the SORT formula fix text dates automatically?
No. SORT returns values in sorted order but does not convert date-like text into calendar dates. Convert the entries first; otherwise, the result may follow text ordering rather than chronological ordering.
Related
- Excel Shortcut to Select Cells to the End of a Column
- Excel Shortcut to Select the Active Cell’s Entire Column
- Excel Shortcut to Select to the Bottom of a Column
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Average in Excel Not Working? Common Causes and FixesIf AVERAGE in Excel is not working, first check that the referenced cells contain numbers and that none…
- Dates Not Showing as Dates in Excel? Fix the FormatIf dates are not showing as dates in Excel, first check whether the cells contain real date values…
- Excel Formula Not Working? Common Causes and FixesIf a formula is not working in Excel, first check whether the cell is formatted as Text, calculation…
- How to Change a Range Name in Excel and Fix ReferencesTo change a named range in Excel for Microsoft 365 on Windows, open Formulas > Name Manager, select…
- Excel VALUE Formula Not Working? Fix Common ErrorsIf Excel’s VALUE formula is not working, first check whether the cell contains text Excel can interpret as…
- Array Formula Excel Not Working? Common FixesIf an Excel array formula is not working, first check whether it needs to spill into empty cells…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.