Offroadracer_814
New Member
- Joined
- Aug 7, 2015
- Messages
- 24
Hello,
Thanks for taking you time to read my problem. I am tracking my blood pressure. With Column A being current date and time (m/d/yy h:m AM/PM).
What I envision is once I but the first number into column B. That a code would insert the current date and time. Then make my active cell as column C to enter the next number.
I found this code on the internet. But, I can not figure out the offset correctly. Plus, I know I have to change the Target Column to 2. But, it is kicking my backside.
'Code by Sumit Bansal from https://trumpexcel.com
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Handler
If Target.Column = 1 And Target.Value <> "" Then
Application.EnableEvents = False
Target.Offset(0, 1) = Format(Now(), "dd-mm-yyyy hh:mm:ss")
Application.EnableEvents = True
End If
Handler:
End Sub'Code by Sumit Bansal from https://trumpexcel.com
Any help would be appreciated.
Thanks
Kevin
Thanks for taking you time to read my problem. I am tracking my blood pressure. With Column A being current date and time (m/d/yy h:m AM/PM).
What I envision is once I but the first number into column B. That a code would insert the current date and time. Then make my active cell as column C to enter the next number.
I found this code on the internet. But, I can not figure out the offset correctly. Plus, I know I have to change the Target Column to 2. But, it is kicking my backside.
'Code by Sumit Bansal from https://trumpexcel.com
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Handler
If Target.Column = 1 And Target.Value <> "" Then
Application.EnableEvents = False
Target.Offset(0, 1) = Format(Now(), "dd-mm-yyyy hh:mm:ss")
Application.EnableEvents = True
End If
Handler:
End Sub'Code by Sumit Bansal from https://trumpexcel.com
Any help would be appreciated.
Thanks
Kevin