Need VBA code to change date format of Column A

Column A has several dates, but it's not readable for formula, please provide VBA code to convert all the date at once. Thank you.
Enrique A. Santos KM4ZQCCustomer Service RepresentativeAsked:
Who is Participating?
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.

Wayne Taylor (webtubbs)Commented:
They all look fine to me. What formula is trying to use them?
ShumsExcel & VBA ExpertCommented:

Please try below, change the date format as you want.
Sub ChangeDateFormat()
Dim r As Long
Dim Ws As Worksheet
Application.ScreenUpdating = False
Set Ws = ActiveSheet

r = Ws.UsedRange.Rows.Count

Ws.Range("A4:A" & r).TextToColumns Destination:=Ws.Range("A4"), DataType:=xlDelimited, _
  TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
  Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
  :=Array(Array(0, 4), Array(10, 1), Array(24, 1)), TrailingMinusNumbers:=True
Range("A4:A" & r).NumberFormat = "mm/dd/yy"
Application.ScreenUpdating = True
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
Enrique A. Santos KM4ZQCCustomer Service RepresentativeAuthor Commented:
That's it!!!
Wayne Taylor (webtubbs)Commented:
Hmmm. The same can be done with a single line of code...

Range("A4:A" & Activesheet.UsedRange.Rows.Count).NumberFormat = "mm/dd/yy"

Open in new window

The reason being is that they are already real dates. Just format them how you want.
Bill PrewIT / Software Engineering ConsultantCommented:
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.