Convert Date into Day
Sub date2day()
Dim tempCell As Range
Selection.Value =
Selection.Value
For Each tempCell In
Selection
If IsDate(tempCell) =
True Then
With tempCell
.Value =
Day(tempCell)
.NumberFormat =
"0"
End With
End If
Next tempCell
End Sub
Remove Date from Date
and Time
Sub removeDate()
Dim Rng As Range
For Each Rng In
Selection
If IsDate(Rng) = True
Then
Rng.Value = Rng.Value
- VBA.Fix(Rng.Value)
End If
NextSelection.NumberFormat
= "hh:mm:ss am/pm"
End Sub
No comments:
Post a Comment
THANKS FOR YOUR SUPPORT