EAN-13 barcode check digit

Solved
Anonymous user -  
 CorentinPL -
Hi,
I need a little information.
Does anyone know how the check digit of an EAN-13 barcode is calculated??

Thank you

8 answers

  1. Eddy.vh
     
    Hello.

    If you have the first 12 characters of your EAN code in cell A1, in B1 you can use the following formula:

    =MOD(10-SUM(MID(B1,{2;4;6;8;10;12},1)*3+MID(B1,{1;3;5;7;9;11},1)),10)

    This performs the necessary calculation…

    And to have the complete EAN in cell B2 for quick copy/pasting, the following formula will be useful:

    =A1&MOD(10-SUM(MID(G7,{2;4;6;8;10;12},1)*3+MID(G7,{1;3;5;7;9;11},1)),10)

    If you have a list of codes, simply place the formula in the first cell and drag the fill handle down…
    24
    1. Eddy.vh
       
      Oops, I forgot an "s" in the first 12

      And the G7s need to be changed to B1 in the second formula, where was my head?
      0
    2. CorentinPL
       
      Thank you thank you thank you! For your information: write the first 12 digits of the EAN13 (without the check digit) in cell A1 and write Eddy's code as follows:
      [Calculation of the check digit only]
      =MOD(10-SUM(MID(A1,{2;4;6;8;10;12},1)*3+MID(A1,{1;3;5;7;9;11},1));10)
      or
      [Calculation of the entire code (12&check digit)]
      =A1&MOD(10-SUM(MID(A1,{2;4;6;8;10;12},1)*3+MID(A1,{1;3;5;7;9;11},1));10)
      a+
      -1