Hey everyone,
I am trying to add a missing time to cells that have an existing date.
Example: Setup Start
7/15/13 7/15/13
7/15/13 0:05 7/15/13 0:05
7/15/13 7:00 7/15/13 7:00
7/16/13 7/16/13
I need to add "12:00" to the date without times in them. I have searched the forums and can find several macros to find the cells or to add the "12:00" to every cell. I can't seem to find a macro to add the "12:00" to the end of the date in the cells that are only missing a time.
This is the closest that I have come:
Sub x()
Dim r As Excel.Range
For Each r In Selection
If r.Value = vbNullString Then
r.Value = ":"
ElseIf InStr(UCase$(r.Value), ":") = 0 Then
r.Value = "12:00" & r.Value
End If
Next
End Sub
but it adds the "12:00" to the beginning and I do not know script enough to manipulate. I searched for the ":" and inserted if none was found.
Please help.
Thanks
Chad
Bookmarks