How to Convert Text to Proper Date Formats in Excel: A Step-by-Step Guide
How to Convert Text to Proper Date Formats in Excel: A Step-by-Step Guide
A common frustration many users face with imported data is dates showing up as text rather than proper date formats. This not only makes calculations difficult but also ruins the aesthetics of your spreadsheet. If you’ve been struggling with this, here’s a clear guide on how to solve it.
Why Does Excel Show Dates As Text?
The issue usually occurs when data is imported from other software or files that don’t recognize date formats properly. Excel reads these dates as text because they lack the correct formatting information. This often happens with CSV exports, web scraping results, and external database outputs.
Step-by-Step Solution
The following steps will guide you through converting those pesky text-based “dates” into actual date formats that Excel can work with:
- Identify the Text Dates Column: First, locate which column(s) contain dates formatted as text.
- Backup Your Data (Optional but Recommended): Before making any changes, consider creating a backup of your original data. This way you can always revert if needed.
File > Save As > Choose location and save with different name - Select the Text Dates Column
- Open Date Formatting Options: Go to Data tab on Ribbon, then choose ‘Text to Columns’ in the Data Tools group.
- Choose Delimited Option and Next: The convert text to columns wizard will open. Select “Delimited” as your option, then click next.
- Select Date Format: Choose the appropriate date format that matches with how dates are formatted in your column (this should be based on what you saw when opening ‘Text to Columns’).
- Finish and Apply Changes:
– Click “Next” again if needed, then click Finish.
– Your text-based date entries will now convert into proper Excel dates.
Using VBA for Automation (Advanced)
If you’re dealing with repetitive tasks or large datasets, automating this process using Visual Basic for Applications (VBA) can save time. Here’s a simple macro to help:
Sub ConvertTextToDate()
Dim ws As Worksheet
Set ws = ActiveSheet
' Specify the range you want to convert - change as needed:
Dim rng As Range
Set rng = ws.Range("A1:A20")
For Each cell In rng
If IsNumeric(cell.Value) Then
cell.NumberFormat = "mm/dd/yyyy"
ElseIf Len(cell.Value) > 7 And Mid(cell.Value, 3, 1) = "/" Then ' Assuming MM/DD format detection.
cell.NumberFormat = "mm/dd/yyyy" '
End If '
Next cell
End Sub
'Run the macro:
- Press Alt + F11 to open VBA editor
- Insert a new module and paste code above
- Close the editor, run by pressing: Alt+F8 > Select ConvertTextToDate > Run
Extra Tip for Advanced Users
Combining Power Query with Excel:
Powerful tool within Office 365/Excel version is called Power Query. It can transform raw data into usable form more efficiently than manual methods.
-
– Select your range or table
– Click ‘Transform Data’ button in the Ribbon (Under Data tab)
– Transform Text columns as Dates directly within query editor:
* Go to Home > Dete type column -> Choose Date Type format
After setting up, simply refresh Power Query and dates will be updated on every use.
You can also use CelTools for 70+ extra features specifically made for auditing formulas/automation: CelTools
The Solution Recap & Next Steps
Handling dates as text in Excel doesn’t have to be a headache. With the right steps or automation, you can efficiently convert and format your data.
Conclusion: By following these steps, whether manually converting formats, using VBA for automation, or leveraging Power Query/CelTools features – date formatting issues are easily solvable.
If you found this guide useful don’t forget to explore the tools we mentioned that could take productivity even higher!



















