GregGreg2
11 years agoQrew Member
How to calculate a UPC check digit in QuickBase?
The last digit of a bar code number is a computer check digit which makes sure the bar code is correctly composed.
The final digit of a Universal Product Code is a check digit computed as follows:
- Add the digits (up to but not including the check digit) in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three.
- Add the digits (up to but not including the check digit) in the even-numbered positions (second, fourth, sixth, etc.) to the result.
- Take the remainder of the result divided by 10 (modulo operation) and subtract this from 10 to derive the check digit.
Here is the Excel formula:
=MIN(MOD((SUM(--MID(A1,{1,3,5,7,9,11},1))*3+SUM(--MID(A1,{2,4,6,8,10},1))),10),10-MOD((SUM(--MID(A1,{1,3,5,7,9,11},1))*3+SUM(--MID(A1,{2,4,6,8,10},1))),10))
How can I convert this formula so that it works in QuickBase?
Thank you.
Mr. T