I run a small business and would like to keep track of inventory through excel. However, I am no expert when it comes to programming and would like your expertise. Basically, it is one workbook with one sheet. Looks like this: Excel version 2007

Item name   barcode#         quantity    cost EAC   quantity on-hand    total cost
Hat      041570050392       10      $2.50      10         $20.50

I would like to use a barcode scanner to scan all products and would like to use a barcode scanner to check out when a product is sold so that the excel sheet would keep track with my inventory.  My question is how do I get excel do what I would like for it to do as mentioned above? Thank you so very much sir!


You say you are not expert at programming - so that would lead me to believe you have some expertise with programming in Excel VBA.  

With so little information, it is clear that I can't suggest any specific code. You said two things:
1) I would like to use a barcode scanner to scan all products
2)  would like to use a barcode scanner to check out when a product is sold

for question 1, you can just select a cell in a blank worksheet and scan the first item.  I you have excel configured to go down one cell on a return, then you can keep scanning in items and the bar code will be entered in the next cell below and the cell below that will received the focus.  I am not sure why you would do that - but if you are taking inventory, then you would have a cell with the barcode for each item you scanned.  You could then use and advanced filter to gather a unique list of the barcode and then use the countif formula next to each unique barcode to get a count.  Then you could update your master records.

For question 2, you would scann into a blank sheet, then enter the quantity next to it.  Perhaps select those two cells and run a macro to search the master sheet and decrement the total.   If I were doing it, I think I would run a transaction sheet where I received inventory and sold inventory and kept a record of details for each transaction.  Then you could use a pivot table on that sheet to get your current inventory.  

So the key bit of information is that to the best of my knowledge, most bar code readers provide some type of interface device that allows the barcode to mimic manually typing and ends the typing of the number with a return characters.  So if you have a cell selected in Excel then the barcode reader types the barcode into that cell.   

If you have a specific question I can try to answer that.  

Tom Ogilvy  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.