How to fix the dates and numbers in this workbook

I had this question after viewing how to convert m/d/yyyy to d/m/yyyy.

please see attached example dummy file, i need a macro to to clean up the messed data input.

there are two worksheets in the attached workbook.  Sheet called "messedup" is what i have right now.
the sheet "Cleaned" is the desired solution that after i run the macro it should give me that.

any help is appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pls try
Sub macro1()

For Each c In Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
    aDate = Split(c, "/")
    c.Value = DateSerial(aDate(2), aDate(0), aDate(1))
    c.Offset(, 4) = Replace(Replace(c.Offset(, 4), ".", ""), ",", ".")
    c.Offset(, 5) = Replace(Replace(c.Offset(, 5), ".", ""), ",", ".")
    c.Offset(, 4).Resize(1, 2).NumberFormat = "#,##0.00"
    c.Offset(, 6).NumberFormat = "dd/MM/yyyy"
    If c.Offset(, 6) Like "*/*" Then
        c.Offset(, 6) = DateValue(c.Offset(, 6))
    End If
End Sub

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brian BEE Topic Advisor, Independant Technology ProfessionalCommented:
You have two issues, one is some of the dates are actually text. That can be fixed by the formula from your previous question.

The other is there are date serial number that need to be formatted properly. Just format the column as a date. That will take care of those cells.
FloraAuthor Commented:

thanks a million.

another piece of magical code!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.