How to prevent double entry of bar codes in Excel
HTML-код
- Опубликовано: 17 сен 2024
- How to prevent double entry of bar codes in Excel. Information for double scanned barcode is not recorded in Excel. Determine the amount of time between the same barcode scan. Ignore the second scan of a bar code if it happens too quickly.
For more help visit my website www.easyexcelan... or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Click for online Excel Consulting www.calendly.co...
I am able to provide online help on your computer at a reasonable rate.
www.amazon.com...
I use a Blue condenser Microphone to record my videos, here is the link
amzn.to/37gyyGa
Check out Crowdcast for creating your webinars
app.linkmink.c...
I use Tube Buddy to help promote my videos
Check them out
www.Tubebuddy....
Follow me on Facebook
/ easyexcel.answers
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
www.youtube.com...
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.
Code
Sub access()
Dim barcode As String
Dim rng As Range
Dim foundVal As Range
Dim diff As Double
Dim rownumber As Long
barcode = ActiveSheet.Cells(2, 1)
If barcode (symbol for not equal) "" Then
Set rng = ActiveSheet.Range("a5:a150").Find(What:=barcode, _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If rng Is Nothing Then
ActiveSheet.Range("a5:a1005").Find("").Select
ActiveCell.Value = barcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Date & " " & Time
ActiveCell.NumberFormat = "m/d/yyyy h:mm:ss AM/PM"
ActiveSheet.Cells(2, 1) = ""
Else
rownumber = rng.Row
ActiveSheet.Range(Cells(rownumber, 1), Cells(rownumber, 10)).Find("").Select
ActiveSheet.Range("B3") = Date & " " & Time
diff = DateDiff("s", (ActiveCell.Offset(0, -1)), Date & " " & Time)
ActiveSheet.Range("B3") = ""
If diff (symbol for less than)15 Then
GoTo ende
End If
ActiveCell.Value = Date & " " & Time
ActiveCell.NumberFormat = "m/d/yyyy h:mm:ss AM/PM"
ende:
ActiveSheet.Cells(2, 1) = ""
End If
End If
ActiveSheet.Cells(2, 1).Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A2")) Is Nothing Then
Call access
Application.EnableEvents = True
End If
End Sub
Thank you so much for watching my video. Please note that in the code that I have put in the description of the video, I am not able to put or > or less >, So replace the (symbol for not equal with ) and the symbol for less than with < .
lovely stuff
Please upload video on power bi
Thabk you so much ma'am but I have a question how can we protect from tampering once there's a data entry. Like it will automatically locked when there is a new data entry. Thank you in advance! I'm a subscriber from Philippines
answered on other videi
Thank you so much!! How about making data entry protected after data entry? Please help me! I just want to avoid time tampering, after scanning barcodes then it record the date and time in and out what code we can use to protect the data after? Thank you again in advance! A subscriber from Philiipines!
protecting the sheet would not allow the barcodes to be scanned. Protecting the cell would be have to be done on each cell, very time consuming. sorry
to control gathering at food counter , how can we use the barcode with scanner to prevent duplicates ..can you help
you would have to write code to not allow the code to be scanned twice.
@@BarbHendersonconsulting how do i do that please , kindly guide
any tutorial on that ever made by you? that's so useful nowadays