New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Scanning barcode, match in excel

Macros, VBA, Excel Automation, etc.

Scanning barcode, match in excel

Postby prasan » Sat Feb 04, 2012 9:56 pm

I got a barcode scanner attached to a laptop. In my excel sheet, column A has source#, column B has item to keep or discard. I have a barcode label (source#) on the item in the shelf, so when I scan the barcode label, I want excel to take me to the source# to match in the column A. so I will get to see column B to keep the item or to discard. And I also wanted the row to turn green for keep and red to discard. Can anybody PLEASE help me with this using VBA macro.


Column A Column B
Source# Keep/discard
1572156 Keep
1572293 Discard
1572299 Keep
1572211 Discard
1572364 Keep
1572386 Discard
  • 0

prasan
Rookie
 
Posts: 2
Joined: Feb 4, 2012
Reputation: 0

Re: Scanning barcode, match in excel

Postby Sisyphus » Sun Feb 05, 2012 1:57 am

Hello prasan,
Your question sems very similar to this thread:
http://www.excelkey.com/forum/viewtopic.php?f=2&t=355

Perhaps you like to subscribe to it. (Click on 'Subscribe topic' at the bottom while you look at the thread.)

The difference between that thread and yours seems to be that in the other case the barcode is in a cell on the worksheet while yours is still in the attached scanner and you give no indication of ever wanting to put it on the worksheet at all. Reading data from a scanner into Excel shouldn't be a big deal but it is a separate question and if you have it solved do let us know so that we don't have to deal with it.

Referring to your published question I wonder if you wish to color the matched cell pair in your list permanently. I could easier understand your question if you would want the scanned number somewhere on the sheet and the matching item colored until the next scan changes the number on your sheet and another pair of cells gets lit up. Of course, if this is what you want I would suggest that you don't need a macro and you could probably deduce a solution to your problem from the one I have offered in the other thread.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Re: Scanning barcode, match in excel

Postby charles » Sun Feb 05, 2012 1:47 pm

prasan,

We try to help all members, however, if you post on another forum please let use know so that if you received an answer there we can see it and move on and help other members.

http://www.mrexcel.com/forum/showthread.php?t=610960
  • 0

There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Scanning barcode, match in excel

Postby charles » Mon Feb 06, 2012 1:01 pm

Hi,

Here is a File that I helped a friend with. I have their permission to post it.
I hope this helps you with yours.
  • 0

You do not have the required permissions to view the files attached to this post.
There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Scanning barcode, match in excel

Postby Sisyphus » Mon Feb 06, 2012 11:03 pm

Hi,
I incorporated the idea you described in the solution I offered in the other thread (see my previous post) today, clerly with you in mind since the other guy didn't ask for it. You now have a solution there if you know how to get your barcode into cell E3.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Re: Scanning barcode, match in excel

Postby prasan » Tue Feb 07, 2012 4:54 pm

GREAT!!!!!!! Thank you Charles and Sisyphus, I appreciate taking your time and helping me. This is close to what I want. if you see the attach file,

1. Once I scan the barcode it matches with column A and display its Keep or Discard. (which you guys made possible).
2. Once it matched, in column D i got the weight, which I manually type in taking the sample out weighing it.
3. what I am trying to figure out is, once i typed in the weight in column D, i want excel to take that and place it in column in C matching with the same barcode value C3 and in column A. I trying using Vlookup and working on different formulas, its seem beyond my knowledge, but i will keep trying it. (see attach file)

If you guys have time you can help me with this or i totally appreciate on what you have done so far, thank you. I will keep trying.
  • 0

You do not have the required permissions to view the files attached to this post.
prasan
Rookie
 
Posts: 2
Joined: Feb 4, 2012
Reputation: 0

Re: Scanning barcode, match in excel

Postby Sisyphus » Wed Feb 08, 2012 1:01 am

Hello prasan,
You can't do what you aim to do with a formula because a formula can't write to another cell. It can only show in the cell it occupies whatever is, at that time, in another cell.
However, the code I posted in the other thread this morning already does very nearly what you want. I wonder if you have the capability to adapt it. In doing so you need to decide on the procedure:

1. Scan
2. Write weight

or

1. Write weight
2. Scan

If you choose the first way I would suggest that the code should select the cell where the weight is to be entered (in the same row as the number was found in column A). After entering the weight the code can take you back to the cell where the barcode is entered. However, if you enter the barcode by trigger of the barcode reader you don't need to go there at all except if the number isn't in the list. You could go straight to the next weight cell.

Entering the weight in D3 makes sense if you enter it BEFORE the barcode. Bear in mind that you need a trigger to start the action. The trigger could be entering the barcode number or the weight. Since entering the barcode number already triggers the search action it could transport the weight to its destination at the same time. That would require less code to be written.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Re: Scanning barcode, match in excel

Postby cindy313 » Thu Jul 25, 2013 11:09 pm

scanning barcode ? it also means reading barcode?
  • 0

cindy313
Rookie
 
Posts: 1
Joined: Jul 25, 2013
Reputation: 0
Excel Version: excel2007

Re: Scanning barcode, match in excel

Postby Sisyphus » Sat Jul 27, 2013 11:28 pm

Yes, scanning and reading are, sort of, interchangeable in this context.
A barcode reader = A barcode scanner.
You point the gadget at the barcode, press the trigger, get a Beep, and the scanned picture is sent to the computer which translates the bars into a number which it can then process.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Re: Scanning barcode, match in excel

Postby ssmcdermott » Sun Mar 08, 2015 10:23 pm

Hey guys!

This seems to be the thread I am looking for. I would love to be able to download the file in the thread, however, it will not allow me.

Any ideas?


Thanks in advance
  • 0

ssmcdermott
Rookie
 
Posts: 2
Joined: Mar 8, 2015
Reputation: 0
Excel Version: 2010

Next

Return to Macros and VBA Questions

Who is online

Users browsing this forum: Google [Bot] and 60 guests