Date stamp - Zulu time

trevolly

Board Regular
Joined
Aug 22, 2021
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Im wondering if it is possible to ask for help with current time in a cell and zulu time in my area (-1 hour)

I work at an airport and we type a daily log, with the time being entered in zulu. I have found a vbr code to enter the current time in a cell when I double click but its in local time (+1 hour of zulu). Is this possible?

This is the vbr code I'm using atm.

Thank you all


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified 4-28-18 5:40 PM EDT
If Not Intersect(Target, Range("B4:B218")) Is Nothing Then
Cancel = True
Target.Value = Now()
End If
End Sub
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
2,599
Office Version
  1. 2013
Platform
  1. Windows
Try
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Dim zulu As Date
    If Not Intersect(Target, Range("B4:B218")) Is Nothing Then
        Cancel = True
        zulu = Now() - TimeValue("01:00:00")
        Target.Value = zulu
    End If
End Sub
 
Solution

trevolly

Board Regular
Joined
Aug 22, 2021
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Thank you v much..... why did I volunteer to make a new daily log sheet!! I've got an even harder task ahead!!
 

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
2,599
Office Version
  1. 2013
Platform
  1. Windows
You are welcome!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,570
Messages
5,770,915
Members
425,652
Latest member
Pemby

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
Top