Hi im trying to convert column A dates into date values as my dates contain text which cannot be converted by =datevalue() in excel
Im trying to write the following code but it doesnt work. Can anyone pls help?
Option Explicit
Sub converTextToDate()
Dim Current_Date As Date
Dim Date_String As Object
Dim myrange As Object
Dim DATERANGE As Object
Set myrange = ActiveSheet.Range("A6:A150")
Range("A6:A13").Select
Set DATERANGE = ActiveSheet.Range("A6:A150")
Date_String = Range("A6:A13").Value
Current_Date = CDate(Date_String)
Range("H6:H13").Select
Range("H6:H13").Value = Current_Date
End Sub
Im trying to write the following code but it doesnt work. Can anyone pls help?
Option Explicit
Sub converTextToDate()
Dim Current_Date As Date
Dim Date_String As Object
Dim myrange As Object
Dim DATERANGE As Object
Set myrange = ActiveSheet.Range("A6:A150")
Range("A6:A13").Select
Set DATERANGE = ActiveSheet.Range("A6:A150")
Date_String = Range("A6:A13").Value
Current_Date = CDate(Date_String)
Range("H6:H13").Select
Range("H6:H13").Value = Current_Date
End Sub