Military time to regular time in different timezone

Mux99

Board Regular
Joined
Apr 15, 2019
Messages
57
Hi All

I would like to convert a list of military time in Column C to regular time in a different time zone (+3hr) and also deduct 45 minutes off the new calculated time.

Scedule
TitleDescriptionTime
Test1Apple620
Test2Banana1050
Test3Orange2015

<tbody>
</tbody>


After running the macro it should look like the below. Column D = +2 hours 15 minutes. Column E = +3 hours.

Schedule
TitleDescriptionTimeFromTo
Test1Apple62008:3509:20
Test2Banana105013:0513:50
Test3Orange201522:3023:15

<tbody>
</tbody>

Thanks in advance
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi. Try.
Code:
Sub MilitaryTimeToRegularTime()
 Dim mh As Range
  For Each mh In Range("C3:C" & Cells(Rows.Count, 3).End(3).Row)
   mh.Offset(, 1).Value = TimeValue(Format(mh.Value, "0\:00")) + TimeValue("02:15")
   mh.Offset(, 2).Value = TimeValue(Format(mh.Value, "0\:00")) + TimeValue("03:00")
  Next mh
End Sub
And format D:E as desired.
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,788
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top