Da Food Guy
New Member
- Joined
- Dec 2, 2005
- Messages
- 39
Hi Everyone - another UPC issue. A standard 12 digit UPC is a combination of 11 digits and a calculated 12th digit. I need to create a formula that I can drag down an existing list that calculates the check digit. Here is the instructions on how to calculate it, but I have no clue how to write the formula for it:
Step One:
Suppose you want to find the Check Digit for the UCC-12 (U.P.C.) Number 61414121022. Set up a table with 12 columns, and put the number 61414121022 into Positions One through Eleven. Position Twelve will be blank because it is reserved for the Check Digit.
Step Two:
Add the numbers in Positions One, Three, Five, Seven, Nine, and Eleven:
(6 + 4 + 4 + 2 + 0 + 2 = 18).
Step Three:
Multiply the result of Step Two by three:
(18 x 3 = 54).
Step Four:
Add the numbers in Positions Two, Four, Six, Eight, and Ten:
(1 + 1 + 1 + 1 + 2 = 6).
Step Five:
Add the results of Step Three and Step Four:
(54 + 6 = 60).
Step Six:
The Check Digit is the smallest number needed to round the result of Step Five up to a multiple of 10. In this example, the Check Digit is 0.
Its a dozy, I know, but I'm not sure how it can be done in a single string.
Step One:
Suppose you want to find the Check Digit for the UCC-12 (U.P.C.) Number 61414121022. Set up a table with 12 columns, and put the number 61414121022 into Positions One through Eleven. Position Twelve will be blank because it is reserved for the Check Digit.
Step Two:
Add the numbers in Positions One, Three, Five, Seven, Nine, and Eleven:
(6 + 4 + 4 + 2 + 0 + 2 = 18).
Step Three:
Multiply the result of Step Two by three:
(18 x 3 = 54).
Step Four:
Add the numbers in Positions Two, Four, Six, Eight, and Ten:
(1 + 1 + 1 + 1 + 2 = 6).
Step Five:
Add the results of Step Three and Step Four:
(54 + 6 = 60).
Step Six:
The Check Digit is the smallest number needed to round the result of Step Five up to a multiple of 10. In this example, the Check Digit is 0.
Its a dozy, I know, but I'm not sure how it can be done in a single string.