Avatar of chris pike
chris pike
Flag for Canada asked on

Barcode Scanner to Simple Excel spreadsheet to generate a trip report for 12 items.

Hi there ,
I need a simple solution to get me started on this task.
I want to scan 12 widgets that have 4 pieces of information.
Each piece is separated by a space in the scan and after the last piece there is a carriage return.

Batch#:  (which is a 8 digit number)
Lot #:  which is one letter and 4 numbers (  J1234  )
Date: 10OCT2015 ( DDMMMYYYY )
Widget # ( up to 500 )

On  one scan all this data populates the first active cell in excel, I would like the data to separate into each cell in next column.
Then when the last scan is complete which normally is 12 skids, but could be less, it would be sent to printer to generate a trip report.

Thanks so much.
Should be fun.
Chris
Microsoft ExcelSpreadsheetsHardwareVBA

Avatar of undefined
Last Comment
Frank Helk

8/22/2022 - Mon
SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chris pike

ASKER
Thank you so much Saurabh
I have QR codes already, and I have scanners too, I just need help with how to get the scanned qr code into excel.

I know how to get it into excel but, I need help with programing excel to generate a report after I make 12 scans.

Thanks so much.
Chris
Frank Helk

I presume the text is stuffed into a single cell value and it seems to contain line separators like CR, LF or CRLF.

I would put this macro into the workbook (into a VBA module):
Function SplitMultiline(text As String, element As Integer) As Variant

    On Error GoTo Fehler
    
    Dim delim As String
    delim = "#"
    If InStr(1, text, vbLf) > 0 Then delim = vbLf
    If InStr(1, text, vbCr) > 0 Then delim = vbCr
    If InStr(1, text, vbCrLf) > 0 Then delim = vbCrLf
    
    If delim = "#" Then GoTo Fehler
    
    SplitMultiline = Split(text, vbLf)(element - 1)
    GoTo Ende
    
Fehler:

    SplitMultiline = CVErr(xlErrNum)
    
Ende:

End Function

Open in new window


It would determine the line separator and return the given element.

That way you input the into a given cell and extract the parts as you like ... given
Line1
Line2
Line3
Line4
as cell content in A1, the formula
=SplitMultiline(A1;2)

Open in new window

(syntax may varyslightly by locale) would return
Line2
as result. Cells without a known delimiter or index out of range would return an Excel compatible error code.
Danny Child

When I had a simple ad-hoc scanning request, I used the Manatee barcode scanner app for Android on my Samsung tablet
https://play.google.com/store/apps/details?id=com.manateeworks.barcodescanners

This read the code that I wanted, and put it on the clipboard.

I could then Paste this into any preferred spreadsheet app on the tablet.  I used WPS Office at the time, but it would work just as well with the Android version of Excel.  I then emailed this into my work email address

If the question is more about how to split up a single string of data into the 4 areas required, that should be relatively straightforward using LEFT, MID and RIGHT functions if the data has consistent numbers of characters.

If it has varying lengths (such as if using single AND double digits for the day of the month, or month itself) for instance, you may need to use FIND to select an appropriate "marker" or delimiter character.  

Can we get an example of the raw data, and perhaps preferred results to work with?

If the question is more to do with the automated submission after 12 entries, then it's macro-related... Again, an example would be helpful.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
chris pike

ASKER
Hi Dan,
This small project is moving right along, and I have made it over a few hurdles already.

We are using a BlueTooth wireless handled scanner. I was thinkning it would be great to have an ipad doing the scan then you could actually see a missed code or a double code on the ipad screen instead of waiting until you finish a bunch of scanning and go to the other side of the warehouse to check the computer. But at this time, we have what we have and we are moving forward with this system.

 I have been able to split the code easily using "Data Tab- Split to Columns". I am using a Macro button to split it, as I wanted to wait until all the scans were in and then split them all together. I guess if I knew how to code the VB to split it on the fly after each code, that would work, but I am not that techy. But for now this works just fine.

Now my next challenge is the next worksheet where I need excel to change where the next active cell engages after a enter key. (scan). When you hit enter the default placement of the cursor is on cell below, or one cell beside (excel prefs.). It's either or. I need excel to let do 2 cell entries side by side then the third entry to drop down.

I have attached the help files.
Thanks for your help.
Chris
chris pike

ASKER
Here is the location for the Question
https://www.experts-exchange.com/videos/1198/Excel-After-Enter-Cursor-Location.html
Thanks
Was a little trickier to upload a video than I thought.
Chris
114-warehouse-location-master.xlsx
Frank Helk

Hmmm .... sounds like a task for VBA to me.

For such a scanning task I'd implement some kind of user form -  fired up i.e. with a button - that catches the text (i.e. as simulated keyboard input) to asimple text box. The user probably could inspect the caught text and click/tap a button. The form code the splits the input, and drops the parts i.e. in the last selected field, the next filed to the right and a field 7 columns right of the initial field. Afterwards it selects the field i.e. 2 rows below the last field selected and ends. Do you think of such a thing ?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
chris pike

ASKER
Unfortunatly, We have a handheld scanner on a forklift in the warehouse scanning every single skid that comes in, and then scans the location barcode off the racking. The forklift operator does not have access to the computer that will be sitting on a desk on the other side of the warehouse.

I need Excel to be smart enough to know when it is scanning a 20 digit code and to put it into the first active cell.
I need excel to know that the smaller 7 digit code (second scan) to be placed on the same row as the first scan made with the 20 digits.

Does that kind make sense?
Thanks
Chris
ASKER CERTIFIED SOLUTION
Frank Helk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.