By: Shamima Sultana

In reply to Larry.

Hello Larry,

To add the date to column K of the matched row of TCN of column B, you will need to use the Date function. It will provide the current date.

Here, I updated the VBA code to add the date. Make sure to place this code in the appropriate worksheet module where you are scanning the barcodes.

Private Sub Worksheet_Change(ByVal target As Range)
If Not Intersect(target, Columns("M")) Is Nothing Then
Z = Intersect(target, Columns("M")).Value
If IsNumeric(Z) Then
x = Application.Evaluate("MATCH(" & Z & ",B:B,0)")
Else
x = Application.Evaluate("MATCH(" & Chr(34) & Z & Chr(34) & ",B:B,0)")
End If
If Not IsError(x) Then
Application.Goto Cells(x, 15)
Cells(x, 11).Value = Date & " " & Time ' Adds the current date to column K
End If
End If
End Sub

Regards
ExcelDemy