Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-19-2017, 09:13 AM
NoSparks NoSparks is offline Advance one hour Windows 7 64bit Advance one hour 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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting difference in time as a decimal and percentage of an hour shabbaranks Excel 2 05-23-2017 07:22 AM
Advance one hour 24 hour task calendar doesn't show a day?? benl Project 3 12-31-2015 02:55 PM
12 hour work days (shifts) John Franklin Project 22 11-12-2013 03:19 PM
Can Excel Deduct 30 Minutes from an 8 1/2 Hour Cell? tatihulot Excel 4 05-16-2013 04:30 PM
Advance one hour Half hour added between tasks maruchi Project 1 06-17-2010 08:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft