Referencing a VLOOKUP cell

mharper90

Board Regular
Joined
May 28, 2013
Messages
117
Office Version
  1. 365
Platform
  1. MacOS
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!

CharacterCode 39 Sequence
0123456789101112
*XXXXXXX
0XXXXXXX
1XXXXXXX
2XXXXXXX
3XXXXXXX
4XXXXXXX
5XXXXXXX
6XXXXXXX
7XXXXXXX
8XXXXXXX
9XXXXXXX
 

Attachments

  • Barcode.png
    Barcode.png
    14.6 KB · Views: 9

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,622
Messages
6,179,947
Members
452,950
Latest member
bwilliknits

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