How to Fix Excel Dates That Look the Same but Sort Incorrectly
Question details
The user needs to sort a column of dates, but the dates sort incorrectly because some are stored as text strings and others as date serial numbers, despite looking visually identical.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Sorting date and time data that has been imported or copied from mixed sources.
- Observed behavior
- Dates that appear identical in format sort out of chronological order because Excel processes text strings alphabetically and true dates numerically.
Use the =ISNUMBER() function in an adjacent blank column to quickly identify which dates are recognized as actual numbers (returns TRUE) and which are stored as text (returns FALSE).
Convert Text Dates Using Text to Columns
The fastest and most reliable way to convert a mixed column of text and date-serial numbers into a uniform numerical date format for accurate sorting.
Excel's Text to Columns wizard can force the software to re-evaluate the text strings in your selected column and convert them into true date values.
Highlight the entire column containing the dates that are sorting incorrectly.
Navigate to the Data tab on the Excel ribbon and click the 'Text to Columns' button.
Choose 'Delimited' and click Next twice to bypass the first two steps and reach Step 3 of the wizard.
Under 'Column data format', select 'Date' and choose the format that matches your imported data (e.g., MDY or YMD), then click Finish.
Right-click the highlighted column, select 'Format Cells', and apply a consistent custom format such as yyyy-mm-dd hh:mm:ss. You can now sort the column chronologically.

Standardize Formatting with DATEVALUE and Find/Replace
Use this method if your imported data contains inconsistent spacing that prevents Excel from recognizing the dates properly.
Sort Dates Flawlessly with WPS Spreadsheet
WPS Spreadsheet offers intuitive tools to quickly convert text to dates, ensuring your imported data sorts accurately without requiring complex formulas.
- 1. Select the Data: Open your worksheet in WPS Spreadsheet and highlight the column containing the mixed date formats.
- 2. Open Text to Columns: Navigate to the Data tab on the top ribbon and click on the 'Text to Columns' icon.
- 3. Convert to Date: Proceed to the final step of the setup wizard, choose the 'Date' option, and click Finish.
- 4. Sort the Column: Use the Sort feature under the Data tab to organize your newly converted dates in perfect chronological order.

Frequently Asked Questions
Why do dates in Excel look identical but act differently?
Excel displays dates according to your visual cell formatting, but the underlying data can be stored either as a text string or a numerical date serial number. Text strings sort alphabetically (e.g., 'August' comes before 'January'), while serial numbers sort chronologically, causing mismatched outputs.
How can I easily spot dates stored as text?
By default, Excel aligns text to the left side of the cell and numbers (including true dates) to the right side. You can also use the =ISTEXT(A1) or =ISNUMBER(A1) functions to verify the exact data type of a specific cell.
Does changing the cell format to 'Date' fix the sorting issue?
No. Changing the format of a text-based cell to 'Date' via the formatting menu only dictates how future inputs are handled. You must actively convert the existing text into a date serial number using tools like Text to Columns or the DATEVALUE function.




