How to compute a Check Digit



A UPC Barcode is an 11 Digit Number with a check digit making up a total of 12 numbers.
The first 11 digits are a combination of the prefix and the numbers assigned to a particular product. The final check digit is a mathematical algorithm weaving through the first 11-digits

The number at the far right is the check digit. In this case, it's a 7.

If you want to compute the check digit for a UPC-A Barcode in Excel, do the following:

Put the 11-digit number you want to compute the check digit for in cell A1.

Put this formula in cell B1 (you may need to remove the space where before the 1st and 2nd line)

  =10-MOD(MID($A1,2,1)+MID($A1,4,1)+MID($A1,6,1)+MID($A1,8,1)+MID($A1,10,1)+
(MID($A1,1,1)+MID($A1,3,1)+MID($A1,5,1)+MID($A1,7,1)+MID($A1,9,1)+MID($A1,11,1))*3,10)

Put this formula in cell C1: =if($B1=10,0,$B1)

Put this formula in cell D1:  =CONCATENATE(A1,C1)

The number in cell C1 is the check digit.
The number in Cell D1 us the final 12 digit UPC code

 

 

 

...