Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Clean a Date Column in Excel: Step-by-Step

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To clean a date column in Excel, first check whether the cells are true dates or text that only looks like dates. Select the column, run Data > Text to Columns and click Finish to force Excel to re-evaluate the entries, then apply a consistent date format with Format Cells. If that does not work, use Data > Text to Columns with a delimiter and set the column type to Date with the correct order (MDY or DMY). For stubborn text, use formulas such as =DATEVALUE() or =DATE() with LEFT, MID and RIGHT to rebuild the value. Finally, remove duplicates, fill blanks, and convert the cleaned column to a real Excel date serial so sorting and filtering work reliably.

What You'll Need

  • Microsoft Excel (desktop version recommended; the web version has fewer date-cleaning tools).
  • A backup copy of your workbook before making bulk changes.
  • Knowledge of the date order used in your source data (for example, day-month-year or month-day-year).

Step-by-Step

  1. Back up the workbook. Save a copy with a new name so you can compare or revert if something goes wrong.
  2. Identify the column type. Click a few cells in the date column and look at the Number Format box on the Home tab. If it shows “Text” or the values are left-aligned by default, they are stored as text. Real dates are right-aligned by default and show a date format such as dd/mm/yyyy.
  3. Select the entire date column (click the column letter) and open Data > Text to Columns. Click Next twice, choose Date under Column data format, pick the order that matches your data (MDY, DMY, YMD), and click Finish. This converts many text dates into real dates.
  4. If Text to Columns does not fix it, use a helper column with a formula. For example, if the text is “2024-03-15”, use =DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2)). For “15/03/2024”, use =DATE(RIGHT(A2,4),MID(A2,4,2),LEFT(A2,2)). Copy the formula down, then copy the results and paste as values over the original column.
  5. Remove time stamps if you only need dates. Use =INT(A2) in a helper column, copy down, then paste values back. Format the result as a date.
  6. Standardise the display format. Select the cleaned column, press Ctrl+1 (or Cmd+1 on Mac), choose Date, and pick a consistent format such as yyyy-mm-dd or dd/mm/yyyy. This does not change the underlying value, only how it looks.
  7. Handle blanks and errors. Use Find & Select > Go To Special > Blanks to locate empty cells, then either fill them with a placeholder date or delete the rows. For error values like #VALUE!, check the source text for extra spaces, non-breaking spaces, or mixed separators and clean them with TRIM or SUBSTITUTE.
  8. Remove duplicates and outliers. Use Data > Remove Duplicates on the cleaned column, and sort ascending to spot impossible dates (for example, year 1900 or 2999) that may indicate typos.
  9. Verify sorting and filtering. Apply an AutoFilter and sort oldest to newest. If the order looks wrong, some cells are still text. Repeat step 3 or 4 on those cells.
  10. Convert the column to a Table (Ctrl+T) so future entries inherit the date format and validation. Add Data Validation with the Date criterion to prevent text from creeping back in.

Common Mistakes

  • Assuming left-aligned means text. Alignment can be changed manually; always check the Number Format box as well.
  • Using Find & Replace to change separators without checking regional settings. A slash-to-dash swap can turn a valid date into text if Excel expects a different order.
  • Pasting values without formatting. Copying a formula result and pasting normally can bring the formula, not the value. Use Paste Special > Values.
  • Ignoring the 1900 date system. Excel for Windows starts at 1900, while some Mac workbooks use 1904. Mixing workbooks can shift dates by four years. Check File > Options > Advanced > “Use 1904 date system” if dates look off.
  • Deleting rows before backing up. Bulk deletes are hard to undo after saving. Always keep a copy.

Tips

  • Use =ISNUMBER(A2) to test whether a cell is a real date. TRUE means it is a number (dates are numbers in Excel); FALSE means text.
  • For mixed formats in one column, split the column with Text to Columns using a delimiter, clean each part, then recombine with DATE().
  • Apply a custom number format like yyyy-mm-dd for sorting-friendly display without changing the stored value.
  • Use Power Query (Data > Get & Transform) for large or recurring imports. It can detect and convert date columns automatically and remembers the steps.
  • Keep a “raw” copy of the original column on a separate sheet so you can trace any conversion errors.

Troubleshooting

  • Dates still sort as text. Select the column, run Text to Columns again, and ensure the Column data format is set to Date with the correct order. If the cells contain leading apostrophes, remove them with Find & Replace (find ', replace with nothing).
  • #VALUE! errors after conversion. Check for extra spaces using =TRIM(A2), non-breaking spaces with =SUBSTITUTE(A2,CHAR(160)," "), or mixed separators. Clean the text, then reapply the formula.
  • Some cells convert, others do not. This usually means the column has more than one date order. Split the column into groups by pattern, convert each group separately, then merge.
  • Dates shift by a few years. Check the workbook’s date system setting (File > Options > Advanced). If the source uses 1904 and your workbook uses 1900, add or subtract 1462 days to align.
  • Format changes do not stick. The cells may be formatted as Text. Select them, set the format to General, then reapply the date format. If that fails, clear all formats and start again.

Frequently Asked Questions

Why does Excel treat my dates as text?

Excel stores dates as numbers. If a cell contains text that looks like a date (for example, from a CSV import or manual entry with an apostrophe), Excel keeps it as text. Text to Columns or a formula like DATEVALUE converts it.

Can I clean dates without formulas?

Yes. Text to Columns and Power Query both convert text dates to real dates without writing formulas. Power Query is best for repeated imports.

How do I change the date order from MM/DD/YYYY to DD/MM/YYYY?

Use Text to Columns with the Date column type set to MDY, then apply a custom format of dd/mm/yyyy. Changing only the format does not change the underlying order.

What is the 1904 date system?

It is an older Excel setting used mainly on Mac. It makes dates four years and one day later than the Windows 1900 system. Check File > Options > Advanced if dates look shifted.

How do I remove time from a date column?

Use =INT(A2) in a helper column, copy down, then paste values back and format as a date. This strips the time portion.

Can I prevent text from being entered in the date column?

Yes. Select the column, go to Data > Data Validation, choose Date as the allowed type, and set a reasonable range. This blocks text entries and shows an error message.