Date stamp - Zulu time

trevolly

Board Regular
Joined
Aug 22, 2021
Messages
120
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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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
 
Upvote 0
Solution
Thank you v much..... why did I volunteer to make a new daily log sheet!! I've got an even harder task ahead!!
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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