• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 59
  • Last Modified:

Converting a column that has mixed formatted fields to a column of all dates in Excel

Experts,

The attched file has a mixture of formats.  although they all appear to be dates, some are formatted dates that are actually a text field and the others are dates.

Can someon tell me how to create a column of all dates from these dates?
Mismatch-Dates.xlsx
0
morinia
Asked:
morinia
  • 2
1 Solution
 
Haris DulicCommented:
Hi,

you can use this formula:
=+IF(ISERROR(DATEVALUE(A2)),TEXT(A2,"dd/mm/yyyy"),TEXT(DATEVALUE(A2),"dd/mm/yyyy"))

Open in new window


I added this formula to your example and attached it..
Mismatch-Dates-corr---Copy.xlsx
0
 
Tj aCommented:
The easiest way is to create a new column of values. Just go into an empty column then do this:

=VALUE(A2)

and drag that down for every cell in your old date range. Now just select that cell range and click "format cells" then select date and pick a date format of your choosing.
See the file attached.
Mismatch-Dates.xlsx
0
 
Rob HensonFinance AnalystCommented:
Without use of a helper column, you can use the Text to Columns function.

Select the column and Start the TTC function on the Data tab:

Step 1 - Choose Delimited
Step 2 - Deselect all delimiter options
Step 3 -  Select Date and use dropdown to select the Date format of source data

Click Finish.

Thanks
Rob H
0
 
Rob HensonFinance AnalystCommented:
Another option:

Type 0 in a blank cell and copy to the Clipboard - Ctrl C
Select the range of dates and then Selecte the Paste Special window.
In the top pane choose Values and then in the middle section select Add
Click OK

This forces excel to re-evaluate the contents of the cells and adds 0 to them. The text cells will be converted to dates.

Thanks
Rob H
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now