Excel Won’t Sort Dates Correctly? Fix Date Sorting

Errors & fixes · Updated November 19, 2026

Excel usually sorts dates incorrectly because some entries are stored as text, the column contains mixed date formats, or only part of the table was sorted. Check whether the values are real dates, convert text dates if needed, then sort the entire table with Data > Sort and choose Oldest to Newest or Newest to Oldest.

Why dates can look right but sort wrong

Excel stores a real date as a number representing a day in its date system. For example, a cell can contain the numeric value for a particular day while its number format makes it appear as 3/14/2025. Dates can also include a fractional part for the time of day. The displayed date is a presentation of the underlying value, not proof that Excel recognizes the entry as a date.

Text that resembles a date is different. If a cell contains the characters 3/14/2025 rather than a date value, Excel may sort it alphabetically or place it in a group separate from numeric dates. That can produce a sequence that appears random, especially when some entries were pasted from a website, imported from a text file, or entered using a different regional date convention.

Regional settings matter because a string such as 04/05/2025 can mean April 5 or May 4. Excel may interpret it according to the computer’s date settings, or leave it as text if it cannot interpret it. A date displayed as 04/05/2025 does not reveal which interpretation Excel used.

Check whether the cells contain real dates

Start by selecting a suspicious cell and looking at the formula bar. A date value often appears there in a date-like form, but the formula bar alone is not a definitive test: text can look identical. A practical check is to change the cell format temporarily. Select the cells, choose Home > Number Format, and select General. Real dates will display as serial numbers; text dates will generally remain text.

You can also test one cell with a formula. With the suspected date in A2, enter =ISNUMBER(A2) in another cell. TRUE means Excel stores the value as a number, which includes genuine dates and times; FALSE usually means the value is text. This test does not prove that a numeric value represents a valid date, so also check that the displayed value and range make sense.

If only some rows return FALSE, the column is mixed. A few text entries can disrupt the result even when most dates are valid. Check the top, middle, and bottom of the column, as well as rows that were recently imported or pasted.

Convert text dates with Text to Columns

For a column of consistently formatted text dates, Excel’s Text to Columns wizard is often a straightforward fix. Make a copy of the column or workbook first if the original text must be preserved. Then:

  1. Select the date cells, excluding the header if the column has one.
  2. On the Windows ribbon, choose Data > Text to Columns.
  3. Select Delimited and choose Next, then leave the delimiters unselected and choose Next again.
  4. Under Column data format, select Date and choose the order that matches the text, such as MDY or DMY.
  5. Choose Finish, then check several converted cells by changing their number format to General.

The Date choice tells Excel how to read the source text; it is not merely a display preference. If a source uses day/month/year but you select MDY, ambiguous entries may be interpreted incorrectly. For example, 04/05/2025 can become April 5 instead of May 4. Confirm the source convention before converting, especially when the data comes from another country.

Text to Columns is available in Excel for Microsoft 365 on Windows. On Mac, the command is also under Data, though the wizard’s appearance can differ by release. In Excel for the web, the full Text to Columns workflow may not be available; open the workbook in the desktop app for this conversion if you do not see the command.

Use a formula when conversion needs more control

If Excel recognizes the text date in your regional settings, DATEVALUE can convert it. With a text date in A2, enter =DATEVALUE(A2) in a helper column. For a recognized value such as 3/14/2025 in a US date setting, the result is the date serial 45730; apply a date number format to show it as a date. DATEVALUE depends on how Excel interprets the text, so it is not a safe way to resolve an ambiguous day/month order without checking the source.

For text written consistently as year-month-day, such as 2025-03-14, you can build a date from its parts instead of relying on regional parsing. With an exactly ten-character ISO-style text value in A2, enter =DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)). The result is a real Excel date for March 14, 2025. This formula assumes the text always has the same YYYY-MM-DD layout; inspect the source before applying it to data with varying formats.

After conversion, fill the formula down, check sample results, and copy the helper column. Use Home > Paste > Paste Values to replace formulas with their date results if you want a finished date column, or keep the helper column and sort by it. Do not overwrite the original data until you have verified that the converted dates match the intended calendar days.

Sort the whole table, not just the date column

Once the date values are consistent, select a cell in the data and choose Data > Sort. In the Sort dialog, select the date column under Sort by, confirm that My data has headers is checked when the first row contains headings, and choose Oldest to Newest or Newest to Oldest. Sorting the entire table keeps each date attached to its corresponding name, amount, or other row information.

If you select only the date cells and sort them, Excel may ask whether to expand the selection. Choose Expand the selection when the adjacent columns belong to the same records. Choosing Continue with the current selection rearranges dates without rearranging their related data, which can silently corrupt the table. If Excel does not recognize the full table, select the full data range first and then open the Sort dialog.

For a table with filter arrows, the date column’s menu also offers Sort Oldest to Newest and Sort Newest to Oldest. These commands sort the table rows together. Avoid sorting a partial range that excludes some related columns, blank-row-separated sections, or records that should remain linked.

Check for times, blanks, and inconsistent values

A value can contain both a date and a time even when its cell format shows only the date. For instance, entries on the same calendar day may actually be 9:00 AM and 3:00 PM. Sorting will order those underlying date-time values, so the rows can appear to have duplicate dates while still being correctly ordered by time. To reveal this, temporarily apply a date-and-time number format or inspect the formula bar.

Blank cells and error values can also make the order look unexpected. Decide whether blank dates should remain at the beginning or end, and whether records with errors should be fixed, excluded, or handled separately. Do not replace unknown dates with an invented date merely to force a tidy sort; that changes the meaning of the data. A separate status or notes column can make missing values explicit without pretending they are known dates.

Look for stray spaces, apostrophes, or prefixes in imported values. Text such as a date preceded by an apostrophe may remain text even though it looks normal in the grid. A plain-text marker can sometimes be visible in the formula bar, while leading or trailing spaces may require cleaning the source or using a helper column. Recheck with ISNUMBER after cleanup rather than assuming that the display has changed the stored value.

Prevent date-sorting problems in future imports

When importing a CSV or other text file, confirm the date column’s data type and date order during the import process instead of accepting an uncertain automatic interpretation. Keep a representative source row and verify it against the original system. If the file contains ISO-style dates, preserve that consistent format where possible and convert it deliberately after import.

For dates entered by people, use a consistent convention and make the column’s intended format clear. Formatting a blank column as a date can guide display, but it cannot guarantee that pasted or typed text becomes a valid date. Data validation can help constrain new entries, but imported values still need checking. A recurring report is more reliable when it includes a quick validation step, such as checking whether every nonblank date cell is numeric.

Excel’s 1900 and 1904 date systems are another background detail. They assign different serial numbers to the same calendar date, and workbooks can use different systems. This is more likely to matter when dates are copied between workbooks than when sorting one column within one workbook. If dates shift by a consistent number of days after a transfer, verify the workbook date-system settings before making broad corrections.

Frequently Asked Questions

Why does Excel sort dates alphabetically?

The cells are likely text rather than date values, or the column mixes text and dates. Test a suspicious cell with ISNUMBER, then convert the text using Text to Columns or a suitable helper formula. Check the date order before converting ambiguous strings.

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

The column may contain a mixture of real dates and text dates, or entries interpreted under different regional conventions. Test several cells across the range and inspect unusual imported rows. Convert the entries consistently, then sort the entire table again.

How do I sort dates from newest to oldest?

Select a cell in the table and choose Data > Sort. Select the date field and choose Newest to Oldest. If using a filter arrow in the date column, choose Sort Newest to Oldest there. Make sure the operation includes the whole set of related rows.

Does changing the date format fix sorting?

No. A number format changes how a value is displayed; it does not convert text into a real date. Convert text dates first, then apply the date format you want. Use General or ISNUMBER to help distinguish numeric date values from text.

Why do dates with the same day sort into a different order?

Those cells may include different times that are hidden by a date-only display format. Excel sorts the full date-time values, including the time fraction. Apply a date-and-time format temporarily to see whether the entries differ beyond the calendar day.

Can I sort dates in Excel for the web?

Yes. Select a cell in the table and use the Data tab’s sort options, or use a table’s filter menu. If the underlying values are text, first convert them; for conversion tools not available in the web interface, open the workbook in Excel for the desktop.

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.