update quantity of same same upc

eewholesale

New Member
Joined
Jan 4, 2007
Messages
1
Hello,

Great Board. I never realized how huge Excel was.


Recently I got a bar code reader. IF used in excel it will put the barcode in the current cell and move on to the next one. It works great. But I would like it to update the quantity if the same bar code is scanned in a minute or two later. I need excel to recognize that the same upc has already been entered and to just update the quantity. I looked through a lot of posts and altough some answered similar questions I could not find one exactly the way I need it. Not sure if it is a formula or a simple VBX program.

Thanks in advance,

Justin EEWholesale

Also how do I format the cells to show this upc 027434011297? I tried general, custom and text but all remove the first zero.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
barcode - preprocessing/vba/combination

*disclaimer: I have a limited (2-3 projects) experience with barcodes, and have only used Symbol so far

Simplest first: formatting -- the barcode reader should allow for some processing, e.g. if your upc is 027434011297, you should be able to program it to send to Excel upon a successful scan:
- a single quote ('), then the value scanned (027434011297) resulting in a label (vs. a numeric value)
- other combinations transforming the upc (e.g. 027-434-0011_297), including conditional logic based on characters present within the scanned data)

As far as how to decide on incrementing - based on the scenario you present, I would probably use a VBA/dialog which would accept the scanned UPC value into a textbox, then hit an accelerator key (tied to the VBA code, e.g., Alt-U for Update_Sheet or whatever you like). This logic would then do your bidding:
- if UPC value exists in list, increment it (or prompt to increment it)
else
- add UPC value to list and start its quantity at 1 (or prompt accordingly)

Again, the scanner can be programmed to send the upc value itself, then pause, then send a keystroke mapped to the accelerator on your form, or Tab/Enter, or whatever you can imagine.

If you want to get fancy and set time thresholds, you could certainly catch the date/time of the scan and make decisions based on the date/time of the last time the same UPC was scanned, recorded on the worksheet.

The key is understanding the scanner capabilities and combining with the the Excel automation you prefer.

Hope this helped.
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,706
Members
449,118
Latest member
MichealRed

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