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.
Download Practice Workbook
Get this sample file to practice by yourself.
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.
Step by Step Procedures 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.
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.
- How to Create Barcode Without Font in Excel (2 Smart Methods)
- Generate Code 128 Barcode Font for Excel (With Easy Steps)
- Use Code 39 Barcode Font for Excel (with Easy Steps)
- How to Print Barcode Labels in Excel (with 4 Easy Steps)
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.
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.
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. Keep an eye on ExcelDemy for more exciting articles on excel.