I use the following table as a dictionary for shading cells to make a functioning barcode using the Code 39 barcode sequence. The image attached to this post shows how I assign 1 digit to 13 skinny columns for each character of the barcode. The 13 skinny columns each use VLOOKUP (referencing the single digit) to find whether they should be an X or not. Then conditional formatting turns the X into a shaded cell.
I got that much to work, but now I'm having trouble because the value of the digits in the barcode (ex: "*1234*") are coming from another sheet that has a database of items. Not shown on this page, the user selects the item from a data validation drop down and then VLOOKUP populates the entire rest of the page based on the database matching the selected item from the drop down list. "Barcode" is one of the database columns, and to start, I attempted to use the LEFT command to populate the first digit ("1") of the barcode using VLOOKUP. However, it returns a blank cell and says that it can't find the reference.
How can I use VLOOKUP to populate the numerical digits of the barcode, and then also have the black/white portion of the barcode reference that numerical digit so that it knows how to arrange itself into a barcode using this barcode sequence table?
I know this is tough to explain, and I have the file I can share with someone if that helps. Thanks!
I got that much to work, but now I'm having trouble because the value of the digits in the barcode (ex: "*1234*") are coming from another sheet that has a database of items. Not shown on this page, the user selects the item from a data validation drop down and then VLOOKUP populates the entire rest of the page based on the database matching the selected item from the drop down list. "Barcode" is one of the database columns, and to start, I attempted to use the LEFT command to populate the first digit ("1") of the barcode using VLOOKUP. However, it returns a blank cell and says that it can't find the reference.
How can I use VLOOKUP to populate the numerical digits of the barcode, and then also have the black/white portion of the barcode reference that numerical digit so that it knows how to arrange itself into a barcode using this barcode sequence table?
I know this is tough to explain, and I have the file I can share with someone if that helps. Thanks!
Character | Code 39 Sequence | ||||||||||||
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
* | X | X | X | X | X | X | X | ||||||
0 | X | X | X | X | X | X | X | ||||||
1 | X | X | X | X | X | X | X | ||||||
2 | X | X | X | X | X | X | X | ||||||
3 | X | X | X | X | X | X | X | ||||||
4 | X | X | X | X | X | X | X | ||||||
5 | X | X | X | X | X | X | X | ||||||
6 | X | X | X | X | X | X | X | ||||||
7 | X | X | X | X | X | X | X | ||||||
8 | X | X | X | X | X | X | X | ||||||
9 | X | X | X | X | X | X | X |