Excel won't recognize a date when the cell's value is stored as text, not as a real date serial number. Excel treats dates as numbers (day 1 is January 1, 1900), so anything that looks like a date but is actually text—imported data, cells formatted as Text before entry, trailing spaces, or regional order mismatches—will not sort, calculate, or format as a date. The fastest fix is usually Data > Text to Columns with the correct date order, or a formula that rebuilds the value with DATEVALUE or DATE. Below is the full sequence, from the simplest check to the more stubborn cases.
What You'll Need
- Excel for Windows, Mac, or Excel for the web (menu labels can differ slightly by version, platform, and region)
- The original data, ideally with a backup copy before you overwrite anything
- Knowledge of the date order your data uses (for example, day/month/year or month/day/year)
Step-by-Step
- Confirm the cell is actually text. Select the cell and look at the alignment: text defaults to left-aligned, real dates default to right-aligned (unless alignment was changed manually). You can also check with
=ISNUMBER(A1). If it returns FALSE, Excel sees text, not a date. - Check the cell format before re-entering. If the cell was formatted as Text before you typed the date, Excel keeps it as text even after you change the format. Select the cell, open the Number Format dropdown on the Home tab, and choose General or Short Date, then re-type the date and press Enter.
- Remove leading and trailing spaces. Imported data often carries invisible spaces. Use
=TRIM(A1)in a helper column, copy the result, and paste it back as values. Non-breaking spaces from web pages are not removed by TRIM; use Find and Replace (Ctrl+H) to replace them with nothing. - Use Text to Columns for a whole column. Select the column, go to Data > Text to Columns, choose Delimited and click Next, then Next again. On the final screen choose Date and pick the order that matches your data (MDY, DMY, or YMD), then click Finish. This converts text dates to real dates in place.
- Rebuild the date with a formula when the layout is unusual. If the text is in a form like 20240131, use
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)). If it is 31/01/2024 and your region expects month first, use=DATE(RIGHT(A1,4),MID(A1,4,2),LEFT(A1,2)). Copy the formula down, then copy the results and paste as values over the originals. - Try DATEVALUE for simple text dates.
=DATEVALUE(A1)converts a recognizable text date to a serial number. Format the result as a date. DATEVALUE depends on your regional settings, so it fails if the text order does not match your system's expected order. - Fix the regional order. If your data is day/month/year but Windows is set to month/day/year, Excel may read 03/04/2024 as March 4 instead of April 3. Either change the order during Text to Columns, or adjust the Windows region settings (Settings > Time & Language > Language & region) so the short date matches your data.
- Check for hidden characters. Use
=LEN(A1)and compare with the visible character count. Extra characters mean a clean-up is needed:=CLEAN(TRIM(A1))removes most non-printing characters. - Re-import CSV files correctly. If the problem starts at import, use Data > From Text/CSV and set the column type to Date during the import preview rather than opening the file directly. This prevents Excel from guessing the order.
- Verify the result. After conversion,
=ISNUMBER(A1)should return TRUE, and the cell should sort chronologically. Apply a date format from the Number Format dropdown to display it consistently.
Common Mistakes
- Changing the cell format to Date without re-entering the value. Formatting does not convert text to a date.
- Assuming Excel guessed the order correctly. 01/02/2024 is ambiguous; Excel uses your system's regional setting, which may not match the source data.
- Using TRIM alone on web-copied data. Non-breaking spaces survive TRIM and must be replaced manually.
- Pasting converted dates as formatted text instead of values, which leaves the helper formulas linked and breaks when the source changes.
- Ignoring the two-digit year problem. Excel interprets 29 as 2029 or 1929 depending on the cutoff, so enter four-digit years where possible.
Tips
- Keep a backup copy of the sheet before running Text to Columns, since it overwrites the original cells.
- Use a helper column for formulas so you can compare the result with the original before replacing anything.
- Set the column format to Date before pasting new data, but only after the cells are General—not Text.
- For recurring imports, save the import steps as a query in Data > Get Data so the date type is applied automatically each time.
- Test one cell with ISNUMBER before converting a whole column; it confirms whether the problem is text or formatting.
Troubleshooting
If Text to Columns finishes but the values still will not sort, check that the destination cells are not formatted as Text. Select them, set the format to General, then repeat the conversion. If DATEVALUE returns #VALUE!, the text is not in a form Excel recognizes for your region—rebuild it with the DATE and MID/LEFT/RIGHT formula instead. If dates shift by a few days after conversion, the day/month order was read backwards; undo (Ctrl+Z) and rerun Text to Columns with the other order. If only some cells fail, look for stray spaces or a mix of separators (dots, dashes, slashes) in the same column and standardize them first with Find and Replace. If the file is a CSV that reopens wrong every time, import it through Data > From Text/CSV rather than double-clicking it.
Frequently Asked Questions
Why does Excel treat my date as text?
Usually because the cell was formatted as Text before entry, the data was imported as text, or the value contains spaces or characters Excel does not accept as part of a date.
Does changing the format to Date fix it?
No. Formatting only changes appearance. Text must be converted—by re-entering it, Text to Columns, or a formula—before a date format has any effect.
Why does Excel swap the day and month?
Excel reads ambiguous dates using your system's regional short-date setting. If your data uses a different order, set the order explicitly in Text to Columns or rebuild the date with the DATE function.
Can I convert a whole column at once?
Yes. Text to Columns works on the entire selected column in one pass and is the quickest method for large lists.
Why does DATEVALUE return an error?
The text does not match a date format Excel recognizes for your region. Rebuild it with DATE, LEFT, MID, and RIGHT instead.
Will this work in Excel for the web?
Text to Columns and the DATE function are available in Excel for the web, but some import options are limited; for CSV files, the desktop app gives more control over date order.