When Excel does not sort dates correctly, the usual cause is that some entries are stored as text instead of real date values, or that the sort includes the wrong range. Check whether the dates are genuine Excel dates, select the full data range, and sort by the date column using Data > Sort > Oldest to Newest.
How Excel stores and sorts dates
Excel does not normally store a date as a word such as “April 5, 2025.” It stores a date as a serial number and displays that number using a date format. In the default 1900 date system, for example, later dates have larger serial values than earlier dates. Sorting works on those underlying values, not on the appearance of the cells.
A genuine date cell can therefore look exactly like a text entry while behaving differently. A date formatted as “5-Apr-25” and the same date formatted as “04/05/2025” may represent the same underlying value, depending on the workbook’s regional settings. Conversely, text that looks like a date may not be recognized as one at all.
When all values are real dates, an ascending sort places the earliest date first and a descending sort places the latest date first. If some cells are dates and others are text, Excel may sort the two types separately or place text entries in an unexpected position. That mixed data is the most common explanation for a list that appears to sort alphabetically or out of chronological order.
First check: are the entries real dates?
Try changing a suspicious cell’s number format to General using Home > Number Format. A real date usually becomes a number; a text date remains recognizable text. You can also test a cell with the ISNUMBER function. If the date is in A2, entering =ISNUMBER(A2) in another cell returns TRUE for a numeric date and FALSE for text. This test identifies the stored type, not whether the displayed date makes sense.
Formatting alone does not convert text into a date. Applying a date format to text such as “2025-04-05” may leave it unchanged, because a number format controls display but does not reinterpret the cell’s contents.
To inspect a column quickly, look for clues such as left-aligned entries among right-aligned dates, a green warning indicator, or a mixture of date styles. These clues are useful but not conclusive: alignment can be changed, and custom formatting can make different underlying values look alike.
Sort the complete table, not just one column
Before changing values, make sure Excel is sorting the intended records together. If you select only the date column and sort it independently, names, amounts, or other fields in adjacent columns can become detached from their original rows. Excel often prompts you to expand the selection; choose Expand the selection when the neighboring columns belong to the same records.
- Click a cell inside the data, or select the full table including its headers.
- Go to Data > Sort.
- If the first row contains headings, check My data has headers.
- Under Column, choose the date field; under Sort On, choose Cell Values; under Order, choose Oldest to Newest or Newest to Oldest.
- Select OK and confirm that each row’s related information stayed together.
For a simple one-column list, use Data > Sort Oldest to Newest or the corresponding sort option on the Home tab. If the data is an Excel Table, use the filter arrow in the date column and select Sort Oldest to Newest. Table sorting is convenient because it ordinarily keeps each row’s fields together and includes new rows added to the table.
Convert text dates into real dates
If the entries are text, convert them before sorting. For dates that Excel can interpret consistently under your regional settings, select the cells and use Data > Text to Columns. Choose Delimited and select Next through the delimiter steps if there are no delimiters to split, then choose Date and the source order (such as YMD, MDY, or DMY) in the column data format step. Select Finish. Check a few converted results before sorting.
The order matters. The text “03/04/2025” could mean March 4 or April 3, depending on the source convention. Excel cannot infer the intended meaning reliably from an ambiguous string, so choose the format that matches the data’s origin rather than the display you happen to prefer.
For text consistently written in ISO-style year-month-day form, such as 2025-04-05, a formula can construct a date from its parts. With the text in A2, enter =DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)) in B2. For the example, the result is April 5, 2025, stored as a real date. Fill the formula down, check the results, then copy the converted cells and use Paste Special > Values if you want to replace the original text. This formula assumes every entry has the same YYYY-MM-DD layout; it is not appropriate for inconsistent strings or dates that include extra text.
DATEVALUE can also convert recognized date text, but its interpretation depends on the text and regional date settings. With a recognizable date string in A2, =DATEVALUE(A2) returns a date serial that you can format as a date. If the source uses a different order from the computer’s settings, do not rely on DATEVALUE to guess correctly. Verify a sample against the original source.
Fix common causes of unexpected order
- Mixed text and date values: Convert the text entries so the entire sort column contains compatible date values. A consistent display format is helpful, but the underlying values are what matter.
- Wrong range or missing header setting: Include all related columns and mark the header row in the Sort dialog. Otherwise, a heading may be sorted as data, or records may become misaligned.
- Dates imported in another regional format: Interpret the source order explicitly. For example, 07/08/2025 is ambiguous without knowing whether the source uses month/day/year or day/month/year.
- Blank cells and errors: Review blanks, formula errors, and notes in the date column. They can affect where rows appear or signal that some entries were not converted.
- Cells that contain date and time: A date-time value includes a fractional time component. Entries on the same calendar day can therefore sort in time order, which may look unexpected if the cells display only the date.
- Custom or multi-level sort settings: In Data > Sort, check that the primary level is the intended date column and that no additional level is taking precedence.
When dates include times
Excel date-time values combine a date serial with a fractional part for the time of day. If one value is April 5 at 9:00 a.m. and another is April 5 at 3:00 p.m., they are different values even when a format displays both as 5-Apr. Sorting them chronologically is correct, but the hidden time can make the ordering seem arbitrary.
To reveal it, select the cells and choose a date-time format from Home > Number Format, or use Format Cells to create a format that shows both date and time. If the time is irrelevant, make a separate date-only helper column rather than silently discarding data. With a date-time value in A2, =INT(A2) returns its whole-number date portion; format the result as a date and sort by that helper column. This keeps the original timestamps intact.
Check regional settings and workbook date systems
Date display and text conversion are influenced by regional settings. A value displayed as 4/5/2025 can represent April 5 or May 4 depending on the convention used when the text was interpreted. Changing the cell’s display format later may alter how a valid date looks, but it does not repair a text value that was parsed incorrectly at import.
Excel workbooks can also use the 1900 or 1904 date system. In Excel for Microsoft 365 on Windows, the workbook setting is under File > Options > Advanced, in the section labeled When calculating this workbook. Workbooks using different date systems can display dates offset by 1,462 days if serial values are transferred without appropriate conversion. This is uncommon in everyday sorting, but worth checking if dates shifted after copying data between older or differently configured workbooks. Do not switch the setting casually: it can affect dates throughout the workbook.
Excel for Mac and Excel for the web
In current Excel for Mac, the core approach is the same: select the data, use the Data tab’s sort controls, and convert text dates before sorting. Menu placement and dialog appearance can differ slightly from Windows. Excel for the web also supports sorting ranges and tables, but some import and conversion controls may be more limited or arranged differently; if the source strings need a specific date order, opening the workbook in the desktop app can make the Text to Columns workflow easier to inspect.
Whichever version you use, verify the outcome rather than relying only on the sort arrow. Check the earliest and latest dates, inspect ambiguous values, and confirm that every row’s related fields remain together.
Frequently Asked Questions
Why does Excel sort dates alphabetically?
Usually the cells contain text rather than date serial values. Convert the text using a method that matches its source format, then sort the resulting dates from oldest to newest.
Why are some dates at the bottom after sorting?
Those entries may be text, blank, or errors while the rest are numeric dates. Check them with ISNUMBER and inspect the original values before converting or removing anything.
Does changing the cell format fix text dates?
No. A date format changes how numeric values appear; it does not necessarily convert text into numeric date values. Use Text to Columns or an appropriate conversion formula, then verify the result.
How do I sort dates without separating names from their rows?
Select a cell in the data and sort the full range, or use an Excel Table’s date-column filter. If Excel asks whether to expand the selection, choose that option when the other columns belong to the same records.
Why do dates on the same day appear out of order?
The cells may contain different times that are hidden by a date-only display format. Show the time to confirm, or sort by a helper column containing only the date portion if time should not affect the order.
Related
- ICD-10 Z Codes List in Excel: Find, Import, and Check
- Excel Color Scales: How Conditional Formatting Works
- Close Excel Shortcut Key for Windows and Mac
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Hyperlink Not Working in Word Header? Fixes That HelpA hyperlink in a Word header usually works, but Word may require a modifier-click to open it, or…
- INDEX MATCH #REF! Error: How to Find and Fix the CauseA #REF! error in an Excel INDEX MATCH formula means that part of the formula points to a…
- Excel Freeze Panes Not Working? Fix Common Excel IssuesIf Excel won’t freeze panes, first switch to View > Normal, click the cell just below and to…
- Excel Not Inserting Rows? Fix the Most Common CausesIf Excel is not inserting rows, first select the worksheet row header where the new row should go,…
- Excel Cell Formula Not Working? Fix the Common CausesIf an Excel formula is not working, first check that the cell is formatted as General, the formula…
- Excel Formula Appearing as Text? Fix It NowIf your Excel formula appears as text instead of calculating, the most common cause is that the cell…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.