Hi Team,
I have seen one post where in dates column. hours and minute to remove and format the date.
I have one question if the given date is in text format, 2017-08-10 : 04:30 , what would be the code,
to remove hours and mintues from it. I have similar kind of situation , One of my colleague told use trim function . but I don't know in vba how to do that. plz help.
Sub RemoveTimeValue()
Dim X As Long, SheetNames As Variant, Cols As Variant
SheetNames = Array("Sheet1", "Sheet2", "Sheet4", "Sheet5")
Cols = Array("J", "L", "P", "R")
For X = LBound(SheetNames) To UBound(SheetNames)
Worksheets(SheetNames(X)).Columns(Cols(X)).Replace " *", "", xlPart
Worksheets(SheetNames(X)).Columns(Cols(X)).NumberFormat = "yyyy-mm-dd"
Next
End Sub
I have seen one post where in dates column. hours and minute to remove and format the date.
I have one question if the given date is in text format, 2017-08-10 : 04:30 , what would be the code,
to remove hours and mintues from it. I have similar kind of situation , One of my colleague told use trim function . but I don't know in vba how to do that. plz help.
Sub RemoveTimeValue()
Dim X As Long, SheetNames As Variant, Cols As Variant
SheetNames = Array("Sheet1", "Sheet2", "Sheet4", "Sheet5")
Cols = Array("J", "L", "P", "R")
For X = LBound(SheetNames) To UBound(SheetNames)
Worksheets(SheetNames(X)).Columns(Cols(X)).Replace " *", "", xlPart
Worksheets(SheetNames(X)).Columns(Cols(X)).NumberFormat = "yyyy-mm-dd"
Next
End Sub