Excel sorts real dates A to Z in chronological order, from oldest to newest. If the dates look out of order, the cells are often stored as text, use mixed formats, or were sorted without their related rows; check the values, correct them if needed, and sort the full range again.
What A to Z means for dates
For a column of genuine Excel dates, A to Z is an ascending sort: the earliest date appears first and the latest date last. The reverse command, Z to A, sorts newest to oldest. Excel may label these choices as Sort Oldest to Newest and Sort Newest to Oldest when it recognizes the column as dates.
The wording can be confusing because A to Z sounds like a text-only operation. Excel uses the ascending direction for different kinds of values: words go alphabetically, numbers go from low to high, and dates go from earlier to later. The key is whether Excel recognizes each cell as a date value, not whether its display looks date-like.
For example, a column containing genuine dates for 2 January, 15 January, and 3 February will sort in that order with A to Z, even if the cells display as 1/2, Jan 15, and 03-Feb. The display format changes how a value looks, not its position in a chronological sort.
How Excel stores and displays dates
Excel stores a date as a number. The whole-number portion represents a day in Excel’s date system, and a decimal fraction can represent a time within that day. A cell might display 4/7/2025, 7-Apr-25, or Monday, April 7, while its stored value remains numeric. That numeric value is what allows Excel to place dates in calendar order.
Date formatting and date values are different things. Applying a date format to a cell that contains text does not necessarily turn that text into a usable date. Conversely, a real date can display as a number if the cell is formatted as General or Number. Neither appearance alone proves what kind of value is stored.
Time can also affect the order. Two entries may both display as 4/7/2025 while one includes 9:00 AM and the other 3:00 PM. If their underlying values include times, the earlier time sorts first. A date-only format hides the time, so entries that look identical may still move relative to each other.
Sort a date column without separating rows
When dates identify records such as orders, appointments, or payments, sort the entire table or range so each date stays beside its correct details. In Excel for Microsoft 365 on Windows, click a cell in the data and use the following approach:
- Check that the data has a clear header row, such as Order date, and that there are no completely blank rows splitting the records.
- Click a date cell, then choose Data > Sort A to Z for oldest to newest. Depending on the ribbon layout and recognition, the command may be described as Sort Oldest to Newest.
- If Excel asks whether to expand the selection, choose to expand it so the other columns move with the dates. In a formatted Excel table, sorting a column normally keeps each row’s fields together.
- If you use the Sort dialog, confirm that the correct date column is selected. If the first row contains headings, make sure the dialog treats the data as having headers.
Do not select just the date cells when each row contains related information. Sorting only one column can detach dates from names, amounts, or descriptions. If Excel does not offer to expand the selection, undo the sort immediately if rows became mismatched, then select the complete range and sort again.
On Excel for Mac, the sorting choices are also available from the Data tab, though exact ribbon wording can vary by version. Excel for the web has sorting controls as well; confirm the whole table or range is being sorted rather than just a single column.
Why a date sort can look wrong
The most common cause is that some or all of the entries are text strings rather than date values. Text is compared as characters, not as points on a calendar. For example, text entries written as 1/10/2025 and 1/2/2025 can sort in an order that surprises someone expecting January 2 before January 10. A consistent, zero-padded text format such as 2025-01-02 may happen to sort alphabetically in calendar order, but that does not make the cells genuine dates.
Mixed data is another source of confusion. A column can contain real dates, text dates, blanks, and values with different regional interpretations. If one entry is read as month/day/year and another as day/month/year, the same digits can represent different dates—or one entry may remain text. Excel may sort recognized dates and text differently, making the result appear inconsistent.
Other clues include a green error indicator, left-aligned values where most dates are right-aligned, or a sort menu that offers A to Z rather than oldest to newest. These are useful hints, not conclusive tests: alignment can be changed, and formatting choices can make dates appear in many ways. Check the underlying value before relying on appearance.
Check whether a cell contains a real date
A quick test is to check whether Excel sees a date cell as numeric. With a date in A2, enter this formula in another cell:
With the suspected date in A2, use =ISNUMBER(A2). The result is TRUE for a genuine Excel date value and FALSE for text such as a date that was imported as characters.
Excel dates are numeric, so this test is useful, but it does not confirm that the date is the one you intended. A numeric value might be an unrelated number, and a text date might still look convincing. Check a few rows, especially the earliest, latest, and any entries with unusual formatting. You can also temporarily change a suspected date cell to General; a genuine date will usually display its serial number, while text remains text.
Do not treat a number display as evidence that a date is invalid. If a cell changes from a calendar-style display to a number after applying General, it may simply need an appropriate date format again. Use the number-format controls to choose a date display; changing the format affects appearance, while converting text changes the stored value.
Convert text dates into Excel dates
For a column of text dates with a consistent known pattern, Text to Columns is a practical conversion method. First make a copy of the column or workbook so the original values remain available. Then select the text-date cells and use these steps in Excel for Windows:
- Choose Data > Text to Columns.
- Select Delimited, choose Next, leave the delimiter selections clear if the dates are not separated into fields, and choose Next again.
- Under Column data format, choose Date, then select the order that matches the source text, such as MDY, DMY, or YMD.
- Choose Finish, then check several converted cells and apply a date display format if needed.
The order selection matters. A text value such as 04/07/2025 is ambiguous: it can mean April 7 or July 4. Choose the format based on how the source data was created, not on a guess based on the current appearance. If the source uses month names or inconsistent patterns, convert a small sample first and verify the results before applying a method to the whole column.
Another option is to re-enter or import the values in a form Excel recognizes under the workbook’s regional settings. A formula such as DATEVALUE can convert recognized date text, but recognition depends on the text and locale; it is not a universal parser for every date format. Whichever method you use, verify the resulting dates and then sort. Merely choosing a date display format will not reliably repair text values.
Handle blanks, times, and multiple sort levels
Blank cells are not dates. They may collect at one end of an ascending sort, depending on the data and sort operation, so decide whether they should remain in the list or be handled separately. Avoid inserting explanatory words such as Pending into a date column if you need a clean chronological sort; put status information in a separate column.
For records with the same date, a secondary sort can make the result easier to read. Open the Sort dialog and add another level, such as sorting first by Order date and then by Customer name. This keeps dates chronological while ordering records within each date. If times are important, confirm that the values actually contain times and use a format that displays them during checking.
If the dates were imported from another system, check whether the source uses a consistent date convention and whether any timestamps include a time zone. Excel does not infer the intended meaning of ambiguous text just from the surrounding rows. When the source convention is unclear, consult the export settings or the person who supplied the file before converting.
Common misconceptions and useful alternatives
A frequent misconception is that changing a cell to a date format fixes a text date. It may change the display of numbers, but text generally remains text until converted. Another is that a sort that appears correct proves the values are dates. Uniform ISO-style text can sort in calendar order by coincidence, while still behaving differently in date calculations, date filters, or chart axes.
If you need a non-chronological order—such as fiscal periods, named stages, or a custom sequence—ordinary A-to-Z sorting may not match the intended order. Use the Sort dialog’s available custom-list options where appropriate, or add a helper column with a numeric sequence. For regular dates, however, use the chronological ascending or descending command rather than trying to arrange date strings alphabetically.
After conversion, test the result with a few known dates and try a simple ascending sort on a copy of the data. Confirm that related columns stayed aligned and that no ambiguous values were interpreted incorrectly. This small check is especially worthwhile before using sorted data for reports, charts, or further calculations.
Frequently Asked Questions
Does A to Z mean oldest to newest in Excel?
Yes, when Excel recognizes the cells as dates. A to Z or ascending order places the earliest date first; Z to A or descending order places the latest date first.
Why does Excel sort dates alphabetically instead of chronologically?
The cells may contain text rather than date values. Text is sorted by characters, so convert the entries to real dates using a method that matches their source format, then sort again.
Will formatting text as a date fix the sort?
Not usually. Number formatting changes how recognized values appear; it does not by itself convert text into numeric date values. Use a conversion method such as Text to Columns and verify the result.
Why are two dates that look the same in a different order?
They may contain different hidden times, or their displayed format may conceal other differences. Check the underlying values and temporarily display both date and time if relevant.
Can I sort dates without moving the rest of each row?
Yes. Select a cell in the data and sort the full range or table. If Excel asks whether to expand the selection, choose that option so each date remains with its associated information.
Related
- Excel Conditional Formatting Number Formats Explained
- Excel Conditional Formatting With Dates: A Practical Guide
- Excel Conditional Formatting for Date Ranges Explained
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- COUNTIFS Not Working With Dates? Fix the CriteriaYes—COUNTIFS often misses dates because its criteria are written as text, the cells contain text rather than real…
- Excel Drag Down Formula Not Updating? Fix Common CausesIf an Excel formula does not update when you drag it down, first check that Excel is set…
- Excel UNIQUE and FILTER #CALC! Error: Causes and FixesA #CALC! error in an Excel formula that combines UNIQUE and FILTER most often means FILTER found no…
- Excel CSV Import Issues: Fix Dates, Delimiters, and ZerosTo fix most Excel CSV import issues, import the file through Data > From Text/CSV instead of double-clicking…
- Why Won’t Data Validation Work in Excel? Common FixesExcel data validation usually seems not to work because the rule is missing or applied to the wrong…
- Excel Consolidate: Fix Overlapping Source ReferencesYes. In Excel for Microsoft 365 on Windows, Data > Consolidate can reject a source reference if it…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.