Forum Discussion
Nina_SC
Jun 07, 2019Copper Contributor
Convert Text to Date Format
Hello everyone, I'm just an excel newbie and I've been finding ways on how to convert a date text string to date format. I find it peculiar that after transferring all my CSV files through a flas...
- Jun 07, 2019
Hi Nina,
you can use this macro, see attached file to convert dates. It converts all dates in selection to real date.
Sub KonvertDate()
Dim rngCell As Range
For Each rngCell In Selection
rngCell.Value = CDate(rngCell.Value)
Next rngCell
End SubBest regards from germany
Bernd
http://www.vba-tanker.com
Berndvbatanker
Jun 07, 2019Iron Contributor
Hi Nina,
you can use this macro, see attached file to convert dates. It converts all dates in selection to real date.
Sub KonvertDate()
Dim rngCell As Range
For Each rngCell In Selection
rngCell.Value = CDate(rngCell.Value)
Next rngCell
End Sub
Best regards from germany
Bernd
http://www.vba-tanker.com