Macro Help (Barcode Scanner to Excel Sheet)

RebelDrummer

New Member
Joined
Jul 11, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Thanks for adding me - first post, lets hit the ground running

Here is what I am working with.
1.. Barcode / SKU scanner.
2 .. Excel Master Data List (all on one tab/sheet)

Here is what I am able to do now.
Take the scanner, scan a barcode on a product, excel finds that item and highlights the entire row

Here is what I would like to see happen, if possible.
Take the scanner, scan a barcode on a product, excel finds that information and creates a new row on the new tab/sheet with that data

Is this possible? Is creating a Macro the way?
I do appreciate the help in advance

Thanks
 
It's always hard to make suggestions not being able to see the exact layout of your data. A dummy file attached would be appreciated.
Anyway, as per the second option, I think that you haven't pasted the macro in the sheet's module. As said it uses an event macro so it won't work if pasted elsewhere. As a shortcut instead of going to the Editor, you can right-click the input sheet's Tag and then choose View Code.
see above and tell me if this will work for a visual
post #9 is the "master file" that I will open the "find" feature (ctrl+f) and then in the search field is where i will scan the physical bar code in front of me
post #10 is the "customer order" that I need it to ultimately turn into

in this example, its a small order so ctrl+c / ctrl+v isnt too terrible .. HOWEVER .. small orders are not the norm and I am having to scan A LOT of skus and create these data sheets.
in a perfect ideal situation, i would have a macro set up to where as soon as i scan the SKU, it will send it over to sheet #2 (or in this case "customer order" tab)
from there, i then have to take the data and copy/paste it into another 3rd party software to finalize my order
large orders take FOREVER to do manually (meaning hand writing the info and then typing it into excel and the copy/paste into software)
I have more than 1 person that populates this info for me as so I am hoping to not only make it faster, but to remove the human error aspect

thanks in advance and if you need more, just let me know
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Which cell in sheet "car parts master" did you choose as barcode reader input cell ? At the moment I have update the event macro for cell H1. As said the macro has to be pasted in the"car parts master" sheet module and be the only Worksheet_Change event macro present.
VBA Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim lr     As Long
    If Not Target.Address = "$H$1" Then Exit Sub  '<-- change cell as needed
    Application.ScreenUpdating = False
    On Error GoTo notfound
    Range("A2:A" & Rows.Count).Find(What:=Target.Value, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext).Activate
    With Sheets("customer 1 order")
        lr = .Range("A" & Rows.Count).End(xlUp).Row + 1
        ActiveCell.EntireRow.Copy .Cells(lr, 1)
    End With
    MsgBox "Done!"
    GoTo nextscan
notfound:
    MsgBox "Item not found!"
nextscan:
    With Application
        .CutCopyMode = False
        .EnableEvents = False
        Range("H1").Select                '<-- change cell as needed
        Range("H1").ClearContents         '<-- change cell as needed
        .EnableEvents = True
        .ScreenUpdating = True
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top