i have used this vba code to change date format in excel file on particular sheet
Sub ToDate()
Dim LR As Long, i As Long
LR = Range(“A” & Rows.Count).End(xlUp).Row
For i = 2 To LR
With Range(“A” & i)
.NumberFormat = “dd/MMM/yyyy”
.Value = DateValue(.Value)
End With
Next i
End Sub
but it throws an error at .Value = DateValue(.Value)
i have also attached excel file please refer bellow and any help could be appreciated
I was just showing the sample on how to do it…I already shared the post where xaml has attached …Have you downloaded and checked?? if not , I would advice to do that first…
OR …if you have only less # of rows then we can do it in the traditional for each method…if you would like to take this avenue please let me know…i will show the steps…