Artkrum4th
New Member
- Joined
- Oct 25, 2023
- Messages
- 2
- Office Version
- 2016
- Platform
- Windows
Hello! I have tinkered with some formulas I found on the interwebs but they are not producing the resulting digit that passes the cager's validation (this is for a fundraising mailer). I am at my wits end! I can convert alphas to numbers, so I do not need that part.
Here are the requirements:
Example
Scanline: 40290350 HDS1114 12
4 0 2 9 0 3 5 0 H D S 1 1 1 4 1 2
Alphas Converted: 4 0 2 9 0 3 5 0 8 4 2 1 1 1 4 1 2
Weights: 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2
Products: 8 0 4 9 0 3 10 0 16 4 4 1 2 1 8 1 4
Sum of Digits: 8 + 0 + 4 + 9 + 0 + 3 +1+0 +0+ 1+6+ 4 + 4 + 1 + 2 + 1 + 8 + 1 + 4 = 57
Modulus 10: 57 % 10 = 7 (modulus returns the remainder of 57 divided by 10)
Complement Remainder: 10 - 7 = 3 (subtract the remainder 7 from 10)
Check Digit: 3
Here are the requirements:
Mod-10 Check Digit Routine
Example
Scanline: 40290350 HDS1114 12
4 0 2 9 0 3 5 0 H D S 1 1 1 4 1 2
Alphas Converted: 4 0 2 9 0 3 5 0 8 4 2 1 1 1 4 1 2
Weights: 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2
Products: 8 0 4 9 0 3 10 0 16 4 4 1 2 1 8 1 4
Sum of Digits: 8 + 0 + 4 + 9 + 0 + 3 +1+0 +0+ 1+6+ 4 + 4 + 1 + 2 + 1 + 8 + 1 + 4 = 57
Modulus 10: 57 % 10 = 7 (modulus returns the remainder of 57 divided by 10)
Complement Remainder: 10 - 7 = 3 (subtract the remainder 7 from 10)
Check Digit: 3