View Single Post
 
Old 07-19-2017, 09:13 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Give this a shot...
Code:
Sub AdvanceTimes()

    Dim tmp, cel As Range
    Dim firstTime As String
    Dim secondTime As String
    
With Sheets("Sheet1")
    For Each cel In .Range("B3:C25")
        tmp = Split(cel.Value, "-")
        firstTime = CStr(Format(DateAdd("h", 1, CDate(tmp(0))), "hh:mm"))
        secondTime = CStr(Format(DateAdd("h", 1, CDate(tmp(1))), "hh:mm"))
        cel.Value = firstTime & "-" & secondTime
    Next cel
End With
End Sub
Reply With Quote