View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave O Dave O is offline
external usenet poster
 
Posts: 427
Default How can I Calculate Check Digit for UPC A - the 13th warrior

Here's my submission:
=A1&MOD(10-MOD(SUMPRODUCT(MID(A1,ROW($1:$12),1)*(1+2*ABS(MOD( ROW($1:$12),2)-1))),10),10)

My hat is off to whoever provided the original formula: I learned a lot
today. Very clever!

Strongly recommended to test against samples that are known to be
correct.