Hi All,
I have a code but I need your help to add some more features here,
Once the time stamp is added to the column In progress start 1 and In progress end 1 then if i select ' In progress' status for the next time i would like to have the time stamp in the column In progress start 2 and else in column 'In progress end 2' without changing the data in the previous two columns In progress start 1 and In progress end 1
Could you please help me here?
Here is the code
Private Sub Worksheet_Change(ByVal Target As Range)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Event macro to be placed in your Source Workbook
' As soon as User fills in data in Column E
' and your two conditions are fulfilled , New record is copied
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim i As Long, lastrow As Long
Dim wksh1 As Worksheet, wksh2 As Worksheet
If Target.Count > 1 Then Exit Sub
If Target.Column <> 7 Then Exit Sub
i = Target.Row
Set wksh1 = ThisWorkbook.Sheets("Sheet1")
' Adjust to your specific situation for Destination Names :
' Workbook Name AND Worksheet Name
Set wksh2 = Workbooks("Employee(final).xlsx").Sheets("Sheet1")
lastrow = wksh2.Cells(Rows.Count, "A").End(xlUp).Row + 1
If Target.Offset(0, -4).Value >= 43586 Then
If Target.Offset(0, -3).Value = "Charles" Or Target.Offset(0, -3).Value = "Nicolas" Then
If Target.Offset(0, 0).Value = "Completed" Then
' All tests Passed - Copy Record and Add Flag next to copied record
Target.Offset(0, 1).Font.Name = "Wingdings"
Target.Offset(0, 1).Value = "?"
wksh1.Range("A" & i & ":G" & i).Copy Destination:=wksh2.Range("A" & lastrow)
End If
End If
End If
If Target.Column = 7 Then
Select Case Target
Case "In progress"
Cells(Target.Row, 9).Value = Date + Time
Case Else
Cells(Target.Row, 10).Value = Date + Time
End Select
End If
End Sub
Screenshot 2023-03-06 163655.png
Bookmarks