Enter current date and time with SHORTEST CUT

Closed
dcfurog Posts 1 Registration date Friday September 26, 2014 Status Member Last seen September 26, 2014 - Sep 26, 2014 at 03:58 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 30, 2014 at 11:05 AM
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!
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Sep 30, 2014 at 11:05 AM
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
0