excel01noob
Board Regular
- Joined
- Aug 5, 2019
- Messages
- 93
- Office Version
- 365
- 2016
Have a column with dates in the format "general" including the time (column G)
2021-03-01T00:00:00.000000
I need to take only the date in the format DDMMYYYY which I am trying to insert in column Q all the way down until the last row
What is missing in the below code?
Sub lefties()
Dim LastRow As Long
Dim LResult As String
LastRow = Cells(Rows.Count, "G").End(xlUp).Row
LResult = Left(Range("G2:G" & LastRow), 10)
Range("Q2:Q" & LastRow).Value = LResult
End Sub
2021-03-01T00:00:00.000000
I need to take only the date in the format DDMMYYYY which I am trying to insert in column Q all the way down until the last row
What is missing in the below code?
Sub lefties()
Dim LastRow As Long
Dim LResult As String
LastRow = Cells(Rows.Count, "G").End(xlUp).Row
LResult = Left(Range("G2:G" & LastRow), 10)
Range("Q2:Q" & LastRow).Value = LResult
End Sub