Can’t Sort Dates in Excel? Fix Text Dates and Sort Order

Errors & fixes · Updated November 19, 2026

If Excel will not sort dates chronologically, the most common cause is that some or all of the entries are stored as text instead of real Excel dates. Select the date column and choose Data > Sort & Filter > Sort Oldest to Newest; if the order is still wrong, convert the text dates into date values first, then sort again.

Why dates can appear out of order

Excel stores a real date as a number representing a day in its date system, then applies a number format to display that value as a date. For example, a cell might contain the date value for March 15, 2025, while its display format shows 15-Mar-25. Sorting works on the underlying values, not on how those values look on screen.

A text entry that looks like a date is different. Excel may treat 03/04/2025 as text, or interpret it as March 4 in one regional setting and April 3 in another. When a column mixes real dates and text that resembles dates, the values may be sorted in separate groups or in a sequence that looks alphabetical rather than chronological.

Sorting also depends on the selected range. If dates belong to rows of names, amounts, or notes, sorting only the date cells can disconnect them from their records. Excel often detects a neighboring data range and asks whether to expand the selection; choose that option when the whole row should move with its date.

Check whether the entries are real dates

Start with a few cells that sort incorrectly. Select one and check the formula bar and the Number Format box on the Home tab. The displayed format can tell you how Excel is presenting a value, but it does not prove that the value is a real date: changing a text cell to a date format alone does not convert its contents.

  • As a clue, dates entered as text are often left-aligned by default, while numbers and real dates are often right-aligned. Alignment can be changed manually, so it is not a definitive test.
  • Try changing a test cell to General from the Home tab’s Number Format list. A real date usually displays as a number; a text date remains text. Undo the change or reapply the date format afterward.
  • Look for inconsistent entries, such as a mixture of 2025-03-15, 15/03/2025, and entries with a leading apostrophe. A leading apostrophe forces Excel to treat an entry as text.

Check several rows, not just one. A column can contain valid dates near the top and text dates lower down, especially when data has been pasted from a website, a CSV file, or another application.

Sort the complete records, not just the dates

In Excel for Microsoft 365 on Windows, select a date cell and use Data > Sort & Filter > Sort Oldest to Newest. To reverse the order, use Sort Newest to Oldest. If Excel displays a Sort Warning, choose Expand the selection when each date is attached to other information in the same row. Choosing Continue with the current selection sorts only the selected cells and can scramble the relationship between dates and records.

For a table with several columns or sorting rules, choose Data > Sort. In the Sort dialog, select the date column under Sort by, set Sort On to Cell Values, and choose Oldest to Newest under Order. If the first row contains headings, make sure My data has headers is checked. You can add another level, such as sorting by customer name after sorting by date.

Excel for Mac has the same basic date-sorting options on the Data tab, although ribbon grouping and wording can vary slightly by release. Excel for the web also supports sorting from the Data tab. In a filtered range or table, the column’s filter arrow provides sort options; use the date column’s menu rather than sorting an unrelated field.

Convert text dates with Text to Columns

For a column of consistently formatted text dates, Text to Columns is a practical conversion method. Make a copy of the column first if the original entries need to be preserved. On Windows, select the cells and choose Data > Text to Columns. In the wizard, choose Delimited and select Next, leave the delimiter options unchanged unless the data actually uses delimiters, and select Next again. Under Column data format, choose Date and the order that matches the source text, such as YMD, MDY, or DMY. Select Finish, then apply a date number format if needed.

The date order matters. For example, 04/05/2025 could mean April 5 or May 4. Choose the format used in the source data, not the format you would prefer to display. If entries use different orders within one column, do not convert the entire column under a single assumption; separate and verify the formats first. The Text to Columns command is also available in Excel for Mac, though the wizard’s presentation can differ.

After conversion, test the result by sorting a small copy or changing one converted cell to General. If the values become serial numbers and then sort in the expected order, Excel now recognizes them as dates. Reapply a consistent date format to make the column easy to read.

Convert ISO text dates with a helper formula

If the entries are text in a consistent year-month-day pattern, such as 2025-03-15, a helper formula can build a true date without relying on the computer’s interpretation of slash-separated dates. Keep the original text in column A and enter the formula in B2, then fill it down:

With the ISO text date 2025-03-15 in A2, enter =DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)) in B2. The result is the real date March 15, 2025, which has Excel serial value 45731 in Excel’s standard Windows date system.

Format the helper column as a date, check that the results are correct, and sort the complete records using that column. If the converted dates must replace the original text, copy the verified helper results and use Paste Special > Values over the original cells; otherwise, retain the helper column as the sortable date field. This formula assumes every source entry follows exactly the YYYY-MM-DD pattern and contains valid date parts.

Check regional settings and ambiguous formats

Excel interprets date text using regional conventions and the selected conversion method. A value such as 12/11/2025 is ambiguous without knowing whether the source uses month/day/year or day/month/year. Do not guess based on how the value appears in a cell. Confirm the source system’s convention, then use that order when converting.

Changing the cell’s displayed format is not the same as changing the underlying value. For instance, applying a format such as dd/mm/yyyy can make a real date display in day-first style, but it will not repair text that Excel has not recognized. Conversely, a valid date can look unfamiliar because it has a different display format. Keep conversion and display formatting as two separate steps.

When a workbook is shared across computers with different regional settings, consistent real date values are safer than ambiguous text dates. Prefer unambiguous source data such as ISO-style YYYY-MM-DD when exporting or documenting dates, and verify the import result before sorting.

Fix common sorting complications

  • Blank cells: Blank entries can appear at an end of the sorted range, depending on the sort direction. Decide whether blanks should remain in the list, be filled, or be removed before drawing conclusions from the order.
  • Dates with times: A date-time value includes both a date and a time, so two rows on the same day may sort by time. Apply a date-only display format if the time is not relevant; this changes the display, not the stored time. If equal calendar dates need to be treated as identical, use a separate date-only helper value.
  • Merged cells: Merged cells in the data range can prevent a normal sort or produce a warning. Unmerge them and place the relevant value in each row before sorting, taking care not to lose information.
  • Formula results: A formula can return a real date or text that looks like one. Check the formula’s output type and sort the resulting values only after confirming Excel recognizes them as dates.
  • Partial selection: If a selection contains only part of a table, Excel may sort only that part or prompt you about expanding the range. Select the table or choose Expand the selection to keep each record intact.

Keep date columns sortable in future imports

When pasting or importing data, check the date column before relying on its sort order. If you use Excel’s import tools, review the detected data types and choose an appropriate date order when available. For a small one-time cleanup, Text to Columns may be enough; for recurring files, a repeatable import process with a known date format reduces the chance of mixed text and date values.

It is also useful to keep the original imported field until the converted values have been checked. Compare a few dates against the source, test a chronological sort, and then decide whether to keep both columns or replace the original. A consistent date format improves readability, but the important requirement for sorting is that every entry be stored as a valid date value.

Frequently Asked Questions

Why does Excel sort my dates alphabetically?

The cells may contain text rather than date values, or the column may mix both types. Convert the text dates using the correct source order, check a few converted values, and sort the full records again.

Will changing the date format fix sorting?

No. A number format changes how a value is displayed, but it does not convert text into a date. Convert the underlying text first, then choose the display format you want.

Why are some dates correct and others in the wrong place?

The column may contain a mixture of true dates, text dates, blanks, or date-time values. Inspect entries from different parts of the column and convert any text dates consistently before sorting.

How do I sort dates without separating names or amounts from their rows?

Select a date cell and sort the range, then choose Expand the selection if Excel asks. For more control, use Data > Sort and select the date field as the sort key for the complete table.

Why does 03/04/2025 turn into the wrong date?

That text is ambiguous: it can mean March 4 or April 3. Identify the source’s date convention and use the matching MDY or DMY setting when converting; do not rely only on the computer’s regional default.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Errors & fixes

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.