October 30, 200322 yr Hi everyone ! Need help with putting together the following formula: The calculation for the checksum for UPC barcodes is pretty straightforward. There are 11 digits Sum of odd digits (first, third, fifth, ....). Multiply by 3. Sum of even digits (second, fourth, sixth...) Add both together. Keep only the units digit ( drop all else). Subtract from 10. = checksum. Greatly appreciate any help with this. Thanks. ~ jack
October 30, 200322 yr (ALL FIELDS ARE NUMBERS) BARCODE SUM OF ODDS = Left(BARCODE,1) + Middle( BARCODE, 3, 1)+ Middle( BARCODE, 5, 1)+ Middle( BARCODE, 7, 1)+ Middle( BARCODE, 9, 1)+ Middle( BARCODE, 11, 1) SUM OF EVENS = Middle( BARCODE, 2, 1)+ Middle( BARCODE, 4, 1)+ Middle( BARCODE, 6, 1)+ Middle( BARCODE, 8, 1)+ Middle( BARCODE, 10, 1) SUM OF ODDS EVENS = SUM OF ODDS + SUM OF EVENS RIGHT ONE = RIGHT ( SUM OF ODDS EVENS , 1) SUB FM 10 = 10 - RIGHT ONE EASIER TO "SEE" THIS WAY -- cAN COMBINE INTO ONE FIELD IF DESIRED
October 30, 200322 yr Hi Jack, Not sure where you are headed with this project, but you might be interested in this sample file by Christian Jaeger click here HTH Lee
October 30, 200322 yr Author z... Thanks, not only for the calculation, but also for doing it in a way that is easily understandable. ~jack
October 30, 200322 yr Author Lee: Thanks for the information. I have about 600 items for which I have to provide the bar code (including the checksum) so I figured the easiest way is to increment each one, calculate the checksum and put it all together so the bar code can be printed. Hope I'm right ..... ~ jack
Create an account or sign in to comment