I have a monthly file with 55 Rows.
(Every month the number of rows change.)
In Col A, from Row 2 to Row 55, I have date and time as Jun 25, 2018 10:00:36 AM
I want to extract the Date from Col A to Col K from Row 2 to Row 55.
I was using =INT(A2).
Now it is not working in Windows 10.
(I dont know why)
I am trying to use the following code now to get my result.
The VBA halts in this line.
Kindly give me a suggestion.
Thanks in advance.
(Every month the number of rows change.)
In Col A, from Row 2 to Row 55, I have date and time as Jun 25, 2018 10:00:36 AM
I want to extract the Date from Col A to Col K from Row 2 to Row 55.
I was using =INT(A2).
Code:
Range("K2:K" & LastrecNum).Formula = "=INT(A2)"
(I dont know why)
I am trying to use the following code now to get my result.
Code:
With Range("K2:K" & LastrecNum)
.Value = DateValue(Range("A2:A" & LastrecNum).Text) 'Converts Date and Time into Number of the Date
End With
Kindly give me a suggestion.
Thanks in advance.