JumboCactuar
Well-known Member
- Joined
- Nov 16, 2016
- Messages
- 788
- Office Version
- 365
- Platform
- Windows
Hi,
im currently attempting to create a sheet that logs times and i have the following:
Basically:
Cell A2 is scanned with a barcode scanner
Cell B2: Current Date
Cell C3: Current Time
Cell D3: Left Blank until criteria is met (see below)
Cell E3: Username
What im wanting is the End Time to be populated the next time the user is logged a new start time (if that makes sense) and only when the start time + current time is greater than 1 minute
example screen after 1st entry:
if same name is logged again after 1 minute, all his previous blank entries are filled with current time
if same name is logged again under 1 minute the above is skipped
appreciate any help
im currently attempting to create a sheet that logs times and i have the following:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 1 And Target.Row > 1 Then
Target.Cells.Offset(0, 1) = Date
Target.Cells.Offset(0, 2) = Time()
Target.Cells.Offset(0, 4).Select
End If
If Target.Column = 4 And Target.Row > 1 Then
Target.Cells.Offset(1, -3).Select
End If
Application.EnableEvents = True
End Sub
Basically:
Cell A2 is scanned with a barcode scanner
Cell B2: Current Date
Cell C3: Current Time
Cell D3: Left Blank until criteria is met (see below)
Cell E3: Username
What im wanting is the End Time to be populated the next time the user is logged a new start time (if that makes sense) and only when the start time + current time is greater than 1 minute
example screen after 1st entry:
if same name is logged again after 1 minute, all his previous blank entries are filled with current time
if same name is logged again under 1 minute the above is skipped
appreciate any help