Microsoft Excel is a powerful software to conduct the same work as technological devices. With this, we can auto enter the barcode scanner without any scanning device. Whenever you scan any barcode through a scanner machine, it takes the number and scanning date with time for the record. Here, we will do the same in excel. Therefore, in this article, we will learn how to make an auto enter barcode scanner in excel with quick steps.
What Is Barcode?
Barcode is a machine-readable code. It encodes information with spaces and varying widths of parallel lines. These spaces and lines represent numeric values and characters. Barcodes can encode product information, ID information of employees, any organizational information and lots more. It brings ease, speed, and accuracy to certain work of conduct.
How to Make Auto Enter with Barcode Scanner in Excel
This article will guide you with step-by-step procedures for making auto enter barcode scanners in excel. So without further delay, let’s hop into the steps below.
Step 1: Prepare Worksheet for Data Entry
To start the process, we need to prepare a worksheet first where we will insert all the data one by one. For this reason, here is a data table where the Barcode Numbers will be placed in cell range B5:B14 and the Date & Time values will be automatically entered in cell range C5:C14.
Read More: How to Use Barcode Scanner in Excel
Step 2: Setup Visual Basic Window
At this stage, we will set up the Visual Basic window to insert the VBA Macro code.
- First, go to the Developer tab and select Visual Basic.
- Then, you will see the Visual Basic window appear.
- Here, double-click on Sheet1 which has the dataset.
- Now, select Worksheet as the object sheet.
- Along with it, select Change as the VBA event for this code.
Read More: How to Use Barcode Scanner for Inventory in Excel
Step 3: Insert VBA Macro Code
Now comes the important part of our tutorial.
- First, insert this VBA Macro code on the blank page.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim TableRange As Range
Dim DateTimeRange As Range
Set TableRange = Range("B5:B14")
If Intersect(Target, TableRange) Is Nothing Then Exit Sub
Set DateTimeRange = Range("C" & Target.Row)
If DateTimeRange.Value = "" Then
DateTimeRange.Value = Now
End If
End Sub
- Then, click on the Save button and close the Visual Basic window.
Read More: Barcode Scanner Entry to Excel Database with Timestamp
Step 4: Run Auto Enter for Barcode Scanner
Finally, we will auto enter barcode scanners.
- First, insert your required barcode number in cell B5.
- Then, press Enter.
- That’s it, you will see that the Date & Time is automatically placed in cell C5.
- Following this process, insert each number to get the final output for different times.
Read More: How to Move Barcode Scanner to Next Row in Excel
Download Practice Workbook
Get this sample file to practice by yourself.
Conclusion
In this article, we tried to demonstrate the process of how to make an auto enter barcode scanner in excel with quick steps. Let us know if you have any other methods for this.
Related Articles
- Creating Barcode Scanner to Track Check in & Check out Time in Excel
- How to Print Barcode Labels in Excel
- [Solved] Barcode Scanner Not Going to Next Line in Excel
- Creating a Barcode Scanner Macro in Excel
<< Go Back to Use Barcode Scanner | Barcode in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!