Anne Troy
MrExcel MVP
- Joined
- Feb 18, 2002
- Messages
- 2,632
- Office Version
- 365
- Platform
- Windows
In a cell called offtime, I will enter 2 or 3, depending on the time of year. This indicates that I (on the east coast) am 2 or 3 hours later than the time in Phoenix AZ.
In my worksheet column K, I will enter the east coast time. I want it to auto-change my entry by deducting the value in the cell called offtime.
So far, I just have:
Any help GREATLY appreciated!
In my worksheet column K, I will enter the east coast time. I want it to auto-change my entry by deducting the value in the cell called offtime.
So far, I just have:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then
Exit Sub
End If
On Error GoTo ErrHandler:
If Not Application.Intersect(Me.Range("K4:K50"), Target) Is Nothing Then
If IsNumeric(Target.Value) = True Then
Application.EnableEvents = False
Target.Value = Target - Range("offhours")
Application.EnableEvents = True
End If
End If
ErrHandler:
Application.EnableEvents = True
End Sub
Any help GREATLY appreciated!
Last edited: