Jack Posted October 30, 2003 Posted October 30, 2003 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
zincb Posted October 30, 2003 Posted October 30, 2003 (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
Lee Smith Posted October 30, 2003 Posted October 30, 2003 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
Jack Posted October 30, 2003 Author Posted October 30, 2003 z... Thanks, not only for the calculation, but also for doing it in a way that is easily understandable. ~jack
Jack Posted October 30, 2003 Author Posted October 30, 2003 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now