A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Once the same number is scanned in sheet1 sheet2 would look like this
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello. Was wondering if you could help me with a workbook I'm trying to create. The purpose is to track employees with numbers; on the first sheet (Form) someone will scan their number, it will then get stored on a second sheet with time stamp. The next time the number is scanned it finds the previous entry then adds another time stamp in the column next to the first.
Like this coding but I need the "barcode" entered on one sheet with the data on another
Sub inout()
Dim barcode As String
Dim rng As Range
Dim rownumber As Long
barcode = Worksheets("Sheet1").Cells(2, 2)
Set rng = Sheet1.Columns("a:a").Find(What:=barcode, \_
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, \_
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If rng Is Nothing Then
ActiveSheet.Columns("a:a").Find("").Select
ActiveCell.Value = barcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Date & " " & Time
ActiveCell.NumberFormat = "m/d/yyyy h:mm AM/PM"
Worksheets("Sheet1").Cells(2, 2) = ""
Else
rownumber = rng.Row
Worksheets("Sheet1").Cells(rownumber, 1).Select
ActiveCell.Offset(0, 2).Select
ActiveCell.Value = Date & " " & Time
ActiveCell.NumberFormat = "m/d/yyyy h:mm AM/PM"
Worksheets("Sheet1").Cells(2, 2) = ""
End If
End Sub
Please help
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Sheet1 which I call Form, in cell D16 a barcode is scanned. Im trying to get that barcode to go to sheet2 which I call Data in cell A3 with a timestamp in B3. Once it goes to sheet2 D16 should go back blank. When the same barcode is scanned again into sheet1 D16 I want the data to find it previous log then just add another time stamp two cells to the right (so in this case C3). When barcode is scanned is should look for the next empty cell in A column unless it was previously scanned once.
Your scanner writes a barcode in which sheet and in which cell?
The barcode should be written into column A in which sheet?
Please answer this questions clearly, no extra explanations needed.
Andreas.