Update: A new product (Native Barcode Generator for Excel) has been released since this post was resolved that offers an easier method of generating barcodes in Excel.
Since the goal is to generate the equivalent barcode (with default options) automatically, the use of the VBA will be the font encoding option covered. Code 128 is a commonly used barcode-type (symbology) and will be used in the tutorial. The scanned data will not contain any special formatting.
1. Attach the VBA font encoder, as described, to the worksheet being used:
2. Setup the column for text formatting before scanning (using Column A as the 'scan-in' column):
3. Setup the first cell's formula:
4. Assign DataToFormat to cell where it comes from (do not assign other fields):
5. For now, the result will show as #VALUE!, which is expected.
6. Setup the IF clause to make up for no data in the A2 cell yet. Copy the following into cell B2:
* If A2 is empty, show blank.
* If not empty, show the barcode.
The sheet will look like this with B2 selected, showing the formula and B2 looks empty:
7. Apply the Code 128 Font to cell B2. For this post, we will be using the recommended Medium font at 12 point, named as:
* Demo: IDAutomationSC128M
* Purchased: IDAutomationC128M
8. Copy the formula in B2 to the rest of the cells in Column B (by copying down, Excel automatically adjusts each formula):
9. If the scanner being used has custom programming, it might interfere with expected behavior. It is suggested that the scanner be reset and reinitialized (see your scanner manual). In this example, the IDAutomation SC7-USB-2D Scanner will be used:
* To reset SC7-USB-2D to defaults, scan the "Reset Scanner to Default Settings" barcode from the Reset.
*To initialize SC7-USB-2D, using the default mode (USB HID), scan the respective barcode.
10. Place your cursor, without clicking anywhere else, on the Excel spreadsheet (cell A2) and begin scanning Code 128 barcodes until you reach the cell you last pasted the formula in step 8:
* Step 8 may be repeated if more cells in column B are needed
If it is desired to generate images instead of using a font, refer to the Native Barcode Generator for Excel.
Posted 2259 day(s) ago