Data Import & Export

Convert Text Dates and Sort Excel Data by Year

Steve KSteve K Nov 13, 2026 868 views

Question details

Convert date-looking text values into real Excel dates so records can be sorted chronologically or grouped by year.

Convert Text Dates and Sort Excel Data by Year
Product
Microsoft Excel
Device & OS
not provided
Scenario
A date column contains imported or pasted values that need date formatting and year-based sorting.
Observed behavior
Excel sorts the values as text rather than chronologically. A date number format may be applied, but ISNUMBER returns FALSE and ISTEXT returns TRUE.
Before you start

Check whether the source dates use month/day/year, day/month/year, or year/month/day; ambiguous dates such as 04/05/2024 need a known source order. Keep an empty adjacent column available for conversion formulas, and include all related columns when sorting.

Solution 1Recommended

Convert a consistent text date column with Text to Columns

Use this method when the source dates share a known date order, especially when that order differs from your regional settings.

1
Select the text dates

Select the date cells in one column, excluding the header, then open Data > Text to Columns.

2
Keep each date in one field

Choose Delimited and click Next. Clear delimiter selections that would split the dates, check the preview, and click Next again.

3
Set the source date order

Under Column data format, select Date. Choose MDY for month/day/year, DMY for day/month/year, or YMD for year/month/day, matching the original values rather than the desired display format.

4
Finish and verify the conversion

Click Finish. In an empty cell, enter =ISNUMBER(A2), replacing A2 with a converted cell reference. TRUE confirms that the result is numeric; check a few dates to confirm the month and day were interpreted correctly.

5
Apply a date display format

Select the converted cells and open Home > Number > More Number Formats. Choose Date, or choose Custom and enter yyyy to display only the year.

Convert a consistent text date column with Text to Columns
Formatting does not convert text: Applying a date number format changes how numeric dates appear, but it does not turn text into date serial numbers. Text to Columns must perform the conversion first.
Convert and sort dates in WPS Spreadsheet

Convert Text Dates and Organize Records by Year in WPS Spreadsheet

Use WPS Spreadsheet to convert a consistent text date column with Text to Columns, verify the results, and sort complete records by date or an extracted year.

  1. 1. Open the workbook and check the dates: Open the Excel workbook in WPS Spreadsheet. Inspect the source date order and enter =ISNUMBER(A2) in an empty cell to test a sample value.
  2. 2. Convert the text date column: Select the date cells and open Data > Text to Columns. Choose Delimited, keep each date together in the preview, and select Date with the matching MDY, DMY, or YMD order before clicking Finish.
  3. 3. Format and verify the results: Select the converted cells, open Format Cells from the right-click menu, and choose a Date format. Recheck =ISNUMBER(A2) and confirm that sample dates have the correct month and day.
  4. 4. Create a year sort key: In an adjacent column labeled Year, enter =YEAR(A2) and fill down to extract the year from each converted date.
  5. 5. Sort all related columns together: Select the complete data range and open Data > Sort. Choose the Year column for year-based sorting, or the date column for chronological sorting, and keep related columns included.
Text to Columns supports conversion using the source date order.ISNUMBER and YEAR help verify dates and create year-based sort keys.Supports Microsoft Excel .xlsx and .xls workbook formats.Familiar spreadsheet menus make date formatting and sorting straightforward.
microsoft office alternative - wps office

Frequently Asked Questions

Why does ISNUMBER return FALSE even though the cell is formatted as a date?

The cell still contains text. Home > Number changes the display format, not the stored value. Use Data > Text to Columns with the correct Date order, then test the converted cell with ISNUMBER again.

Should I select MDY or DMY in Text to Columns?

Match the original text order: choose MDY for month/day/year and DMY for day/month/year. For an ambiguous value such as 04/05/2024, confirm its intended meaning from the source before clicking Finish.

Will formatting dates as yyyy sort them only by year?

No. Format Cells > Custom > yyyy displays only the year, but sorting still uses the full date. Add a helper column with =YEAR(A2), then use Data > Sort on that column for an explicit year sort.

What should I do if =--A2 returns #VALUE!?

Inspect A2 for unrecognized date text or unwanted characters. If the source uses a different date order, select the column and use Data > Text to Columns > Date with the matching order. Do not remove the first character unless you have confirmed that it is unwanted.

How can I keep names and amounts aligned when sorting dates?

Select the entire table before opening Data > Sort. If Excel prompts you after selecting only the date column, choose Expand the selection so each complete row moves together.