Unable to Sort Dates in Excel? Fix the Date Sorting Problem

Errors & fixes · Updated November 20, 2026

If Excel will not sort your dates chronologically, the most common cause is that some or all of them are stored as text instead of real date values. Select the date column, convert text dates using Data > Text to Columns with the correct date order, then sort with Data > Sort Oldest to Newest; also check that the sort includes the entire table and its header is identified correctly.

Why Excel dates sometimes sort incorrectly

Excel stores a genuine date as a number and displays that number in a date format. Sorting those underlying values puts earlier dates before later ones, regardless of whether the cells display dates as 8-Mar-2025, 3/8/25, or another format. A value that looks like a date but is actually text does not behave the same way: Excel may sort it alphabetically or group it separately from numeric dates.

Text dates often arrive through copied web pages, CSV files, reports, or systems that use a different regional convention. For example, 04/05/2025 could mean April 5 or May 4. If the source and Excel interpret the order differently, a conversion can produce the wrong date even if the result looks plausible. Establish whether the source uses month/day/year, day/month/year, or year-month-day before converting.

Formatting and conversion are different operations. Applying a date format changes how a value is displayed; it does not reliably turn text into a date. Conversely, changing a real date to General may show a number. That number is the stored date serial, not evidence that the date has been lost.

Check whether the cells contain real dates

Start with a few cells that sort into the wrong places. Select one and inspect the formula bar: an apostrophe or a value that remains a literal string can indicate text, though appearance alone is not a definitive test. Text that is left-aligned and dates that are right-aligned can offer a clue, but alignment can be changed manually, so do not rely on it by itself.

A useful quick check is to change a sample cell’s number format to General from the Home tab. A real date usually becomes a number; text usually remains text. Restore the date format afterward if needed. Check several examples, especially values from different sources or with different separators. A column can contain a mixture of text dates and real dates, and that mixture is a frequent reason that only some rows appear out of order.

Also check for hidden time values. A cell may display only 3/8/2025 while its actual value includes a time such as 3/8/2025 2:30 PM. When sorted, those entries are ordered by time within the same day. If the display hides the time, the order can look arbitrary even though Excel is sorting the full values correctly.

Convert text dates with Text to Columns

For a column of consistently structured text dates, Text to Columns is a practical built-in conversion method in Excel for Microsoft 365 on Windows. Work on a copy first if the source data is important, and make sure the conversion will not overwrite adjacent information. Then use these steps:

  1. Select the cells containing the text dates, excluding the header if there is one.
  2. Choose Data > Text to Columns.
  3. In the wizard, choose Delimited and select Next, then select Next again. For a date-only column, you generally do not need to select a delimiter.
  4. Under Column data format, choose Date and select the order used by the source, such as MDY, DMY, or YMD.
  5. Choose Finish. Apply a date display format from Home > Number Format if the converted dates do not look the way you want.

The date-order selection matters. If the source text is 31/12/2025, choose DMY; if it is 12/31/2025, choose MDY. Values where both first numbers are 12 or less may not expose a mistaken choice, so verify an unambiguous example such as a day numbered 23 or 31 before converting the whole column. On Mac, Excel also provides Text to Columns, though the wizard’s appearance and ribbon layout can vary by release. In Excel for the web, conversion options can differ; opening the workbook in the desktop app may be necessary for this wizard.

Convert a consistent ISO date with a formula

If text dates all use the unambiguous year-month-day pattern YYYY-MM-DD, a formula can build a real date from the year, month, and day components. With the text date 2025-03-08 in A2, enter =DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)) in B2. The result is March 8, 2025; format B2 as a date if it displays as a serial number. Fill the formula down, then copy the results and use Paste Special > Values if you need to replace the original text column.

This formula assumes every entry has that exact four-digit-year, two-digit-month, two-digit-day layout and uses hyphens in the same positions. It is not a general parser for mixed formats, extra spaces, timestamps, or dates such as 3/8/25. For other text, a conversion method must match the source format. DATEVALUE can convert text that Excel recognizes under the computer’s regional settings, but ambiguous strings can be interpreted differently; it is not a safe way to guess the intended month and day.

Sort the full date list, not just one column

Once the values are real dates, click a cell in the data and choose Data > Sort Oldest to Newest. If Excel asks whether to expand the selection, choose Expand the selection so names, amounts, and other row details stay attached to their dates. Sorting only the date column can scramble the relationship between each date and the rest of its record.

For more control, choose Data > Sort. In the dialog, select the date column under Sort by, choose Cell Values under Sort On, and choose Oldest to Newest under Order. If the first row contains labels, select My data has headers. When sorting a range, blank rows or blank columns can cause Excel to treat parts of the data as separate blocks; remove unintended gaps or select the complete range before sorting.

Turning a clean range into a table can make ongoing sorting easier. Select the data and choose Insert > Table, confirming whether the table has headers. The header drop-down then provides a sort option for that field while keeping each row together. Tables do not fix text dates, however; convert the values first, then sort.

Fix mixed formats, spaces, and imported values

If only a few rows remain out of place, inspect those cells individually. Some entries may contain leading or trailing spaces, a nonbreaking space copied from a website, a leading apostrophe, or an unrecognized separator. One group may use periods while another uses slashes. A date column can also include labels such as N/A or words like Pending, which are text rather than dates and may sort to a separate part of the list.

Do not replace separators blindly when the date order is uncertain. Changing 04/05/2025 to another punctuation mark does not establish whether it means April 5 or May 4. Confirm the source convention, then convert using that order. For recurring imports, consider cleaning and converting dates as part of the import process rather than manually fixing every new file. In desktop Excel, Power Query may help with repeatable imports; its available features and interface can vary by platform and version.

When a column has both dates and explanatory text, decide how those non-date entries should be handled before sorting. You might correct them, leave them blank, or keep them in a separate status column. Excel cannot place an unknown date chronologically without a rule for that value.

Check date filters, regional settings, and display

A sort can be correct while the displayed result still seems surprising. Dates formatted to show only a month and year can hide different days; dates formatted to omit the year can hide entries from different years. Select a suspicious cell and choose a format that displays the full day, month, and year. If times might be present, use a format that also reveals hours and minutes.

Regional settings affect how Excel interprets many typed and imported date strings. A user entering 6/7/2025 may intend June 7, while another locale may interpret it as 6 July. Prefer a clearly specified source format and check a few converted results. For shared workbooks, a display format such as 7-Mar-2025 can make the intended month clearer to readers, but it still does not change the underlying value or repair text.

Filters can also make a sorted list look incomplete because some rows are hidden. Clear or review filters from the header drop-downs, and check for hidden rows if the sequence seems to skip dates. If the data is sorted within a table, inspect the whole visible table rather than comparing one column against unrelated rows elsewhere on the worksheet.

Common mistakes to avoid

  • Changing the format and expecting conversion: a date format changes display, not the underlying text value.
  • Sorting one column alone: related information in other columns can become attached to the wrong record.
  • Choosing the wrong date order: MDY and DMY conversions can silently swap month and day for ambiguous entries.
  • Assuming alignment proves the data type: manual formatting can change alignment, so verify with a sample or a conversion test.
  • Ignoring hidden times or filters: they can make a valid sort appear inconsistent or incomplete.

If a sort produces an unexpected result, use Ctrl+Z on Windows to undo it before making another attempt; on Mac, use Command+Z. Undo is useful for reversing the sort, but it does not diagnose why the values behaved that way. Check the cell contents and sort range before repeating the operation.

Frequently Asked Questions

Why does Excel sort my dates alphabetically?
Some or all of the entries are likely stored as text. Convert them to real dates using the source’s correct order, then sort the complete range by cell values. Text dates can sometimes appear to sort chronologically by coincidence, especially when written year-first, so check the data type rather than relying on one result.

Why are my dates still out of order after I changed the format?
Changing the number format does not convert text into date values. Use Data > Text to Columns and specify the source order, or use a formula suited to a consistent text pattern. Also check for mixed date types and hidden time values.

How can I sort dates from oldest to newest?
After confirming the cells contain real dates, click in the data and choose Data > Sort Oldest to Newest. Expand the selection if prompted so the rest of each row moves with its date. For a table, use the date field’s header menu to sort.

What should I do if Excel swaps the month and day?
Undo the conversion if possible, confirm how the source represents dates, and convert again with the correct MDY, DMY, or YMD option. Avoid inferring the convention from an ambiguous value such as 04/05/2025; check a date whose day is greater than 12.

Can I sort dates that include times?
Yes. Excel sorts the full date-and-time value, so entries on the same date are ordered by time. If the times are not visible, apply a format that displays them to confirm the sequence.

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.