I just struggled to calculate the check digit for my EAN13 barcodes. How I can do it easily via Google Sheet?

Updated: February 25, 2023

Thanks for Hans Vonsild. He gave us a Google Sheet formula to do it very easily. I assume that you have 12 digit code in A1. You can use this formula for calculate check digit =arrayformula( 10 - mod( sumproduct( mid(A1; row($1:$12); 1) * (1 + 2 * mod(row($2:$13); 2)) ); 10 ) )

<