Hi Community - it's been a while since I did this, and I can't remember for the life of me how to add / subtract hours from time.
Here is a draft of the VBA code I have to perform expression:
This isn't performing the expression that I would hope. Essentially I will have users that will enter time based on a 12 hour format in column D based on Central Standard Time. After the user has made the change / entry the event should trigger and subtract (2) hours from the users entered time to reflect the time it would be based on Pacific Standard Time. Not sure what exactly I am missing.
Here is a draft of the VBA code I have to perform expression:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("D6") Then
Target.Value = Target.Value - 2
Else
' Do Nothing
End If
End Sub
This isn't performing the expression that I would hope. Essentially I will have users that will enter time based on a 12 hour format in column D based on Central Standard Time. After the user has made the change / entry the event should trigger and subtract (2) hours from the users entered time to reflect the time it would be based on Pacific Standard Time. Not sure what exactly I am missing.