Enter a date in a cell after I have scanned a bar code
Hello, I am trying to add a date in column K after I have scanned the bar code label containing the TCN that is in column B. Below is the VBA code that I am using to find the TCN and then highlights the row and adds that TCN to column N. I like to add the date to column K for each day that I scan. Thank you.
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)
End If
Hello, I am trying to add a date in column K after I have scanned the bar code label containing the TCN that is in column B. Below is the VBA code that I am using to find the TCN and then highlights the row and adds that TCN to column N. I like to add the date to column K for each day that I scan. Thank you. Private Sub Worksheet_Change(ByVal target As Range)If Not Intersect(target, Columns(“M”)) Is Nothing ThenZ = Intersect(target, Columns(“M”)).ValueIf IsNumeric(Z) Thenx = Application.Evaluate(“MATCH(” & Z & “,B:B,0)”)Elsex = Application.Evaluate(“MATCH(” & Chr(34) & Z & Chr(34) & “,B:B,0)”)End IfIf Not IsError(x) ThenApplication.Goto Cells(x, 15)End If Read More