Enter current date and time with SHORTEST CUT

[Closed]
Report
Posts
1
Registration date
Friday September 26, 2014
Status
Member
Last seen
September 26, 2014
-
Posts
2805
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 14, 2021
-
Hi,

I'm using a tracking sheet for incoming couriers everyday, and would like to log each item as they come with current date and time. I've been using CTRL+; (space) CTRL+SHIFT+; for a while, and wondering if there's any other way to input date and time without going thru this long process, maybe pressing 2 Please help.. Thanks!

1 reply

Posts
2805
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 14, 2021
481
Hi Dcfurog,

You can make this process run automatically.

Take a look at this example (as you left out the specifics):
Right-click on the sheets tab and select "View code".
Paste the following code in the big white field:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
Target.Offset(0, 1) = Now
End Sub

After you have done that, enter a value in column A and you will notice that the date and time will be entered in the cell next to it.

Best regards,
Trowa