I need to create a check digit for a financial institution's scanline and am not quite sure how to make that happen using the 7532 weights. The appeal code and package code should be static so I will just assign the appropriate numbers for the letters and will build one string containing all of the numbers for the scanline without spaces. That is unless I should do it a different way. I found some VB code but I am unsure how to use it so if we can get everything to work in Excel or Access that would be wonderful. Thank you for your assistance and I await your responses.
~Chris
The instructions I received are as follows...
Total # of characters: 34
Font: OCR-A
The scan line is 34 characters long including all spaces. It is as follows:
POSITIONS START-END LENGTH DESCRIPTION
1-10 10 ID#1
11 1 Space
12-17 6 Fund2
18 1 Space
19-24 6 Appeal3
25 1 Space
26-32 7 Package4
33 1 Space
34 1 Check Digit Verifier5
1 – ID# - all ID#’s from the client should be 10 characters
2 – Fund - always 451000
3 – Appeal – DM# - 0 fill after DM if necessary (ie DM0213)
4 – Package – Keycode (ie 405R914)
5 – Check digit (for whole scan line)
Alpha Conversion
<tbody>
</tbody>
<tbody>
</tbody>Check Digit (CD) Routine – client required calculation
1. Identify the series of numbers
Ex. 1000108030 451000 DM0213 405R914
2. Convert any alpha characters to a number based on the conversion chart above
<tbody>
</tbody>
3. Assign weights from left to right 7,5,3,2
<tbody>
</tbody>
4. Multiply each number by its assigned weight
<tbody>
</tbody>
5. Sum the digits of the results (1st sum the numbers with 2 digits and then sum the entire line, ie: 24 = 2+6=8)
<tbody>
</tbody>
6. Divide the sum by the modulus 10 to determine the remainder
Ex: 104/10=10.4 – the remainder is 4
7. Subtract the remainder* from the Modulus 10 to determine the check digit
* If the remainder is 0, then the check digit equals 0
Ex: 10-4=6 – the check digit is 6
~Chris
The instructions I received are as follows...
Total # of characters: 34
Font: OCR-A
The scan line is 34 characters long including all spaces. It is as follows:
POSITIONS START-END LENGTH DESCRIPTION
1-10 10 ID#1
11 1 Space
12-17 6 Fund2
18 1 Space
19-24 6 Appeal3
25 1 Space
26-32 7 Package4
33 1 Space
34 1 Check Digit Verifier5
1 – ID# - all ID#’s from the client should be 10 characters
2 – Fund - always 451000
3 – Appeal – DM# - 0 fill after DM if necessary (ie DM0213)
4 – Package – Keycode (ie 405R914)
5 – Check digit (for whole scan line)
Alpha Conversion
Numeric Value | Alpha Value | ||
1 | A | J | S |
2 | B | K | T |
3 | C | L | U |
4 | D | M | V |
5 | E | N | W |
6 | F | O | X |
7 | G | P | Y |
8 | H | Q | Z |
9 | I | R | |
<tbody>
</tbody>
| | ||
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
<tbody>
</tbody>
1. Identify the series of numbers
Ex. 1000108030 451000 DM0213 405R914
2. Convert any alpha characters to a number based on the conversion chart above
1 | 0 | 0 | 0 | 1 | 0 | 8 | 0 | 3 | 0 | 4 | 5 | 1 | 0 | 0 | 0 | D | M | 0 | 2 | 1 | 3 | 4 | 0 | 5 | R | 9 | 1 | 4 | |||
1 | 0 | 0 | 0 | 1 | 0 | 8 | 0 | 3 | 0 | 4 | 5 | 1 | 0 | 0 | 0 | 4 | 4 | 0 | 2 | 1 | 3 | 4 | 0 | 5 | 9 | 9 | 1 | 4 |
<tbody>
</tbody>
3. Assign weights from left to right 7,5,3,2
1 | 0 | 0 | 0 | 1 | 0 | 8 | 0 | 3 | 0 | 4 | 5 | 1 | 0 | 0 | 0 | 4 | 4 | 0 | 2 | 1 | 3 | 4 | 0 | 5 | 9 | 9 | 1 | 4 | |||
7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 |
<tbody>
</tbody>
4. Multiply each number by its assigned weight
1 | 0 | 0 | 0 | 1 | 0 | 8 | 0 | 3 | 0 | 4 | 5 | 1 | 0 | 0 | 0 | 4 | 4 | 0 | 2 | 1 | 3 | 4 | 0 | 5 | 9 | 9 | 1 | 4 | |||
7 | 5 | 3 | 2 | 7 | 5 | 3 | 2 | 7 | 5 | | 3 | 2 | 7 | 5 | 3 | 2 | | 7 | 5 | 3 | 2 | 7 | 5 | | 3 | 2 | 7 | 5 | 3 | 2 | 7 |
7 | 0 | 0 | 0 | 7 | 0 | 24 | 0 | 21 | 0 | 12 | 10 | 7 | 0 | 0 | 0 | 28 | 20 | 0 | 4 | 7 | 15 | 12 | 0 | 35 | 45 | 27 | 2 | 28 |
<tbody>
</tbody>
5. Sum the digits of the results (1st sum the numbers with 2 digits and then sum the entire line, ie: 24 = 2+6=8)
7 | 0 | 0 | 0 | 7 | 0 | 24 | 0 | 21 | 0 | 12 | 10 | 7 | 0 | 0 | 0 | 28 | 20 | 0 | 4 | 7 | 15 | 12 | 0 | 35 | 45 | 27 | 2 | 28 | |||
7 | 0 | 0 | 0 | 7 | 0 | 2+4=6 | 0 | 2+1=3 | 0 | | 1+2=3 | 1+0=1 | 7 | 0 | 0 | 0 | | 2+8=10 | 2+0=2 | 0 | 4 | 7 | 1+5=6 | | 1+2=3 | 0 | 3+5=8 | 4+5=9 | 2+7=9 | 2 | 2+8=10 |
7 | 7 | 7 | 7 | 14 | 14 | 20 | 20 | 23 | 23 | 26 | 27 | 34 | 34 | 34 | 34 | 44 | 46 | 46 | 50 | 57 | 63 | 66 | 66 | 74 | 83 | 92 | 94 | 104 |
<tbody>
</tbody>
6. Divide the sum by the modulus 10 to determine the remainder
Ex: 104/10=10.4 – the remainder is 4
7. Subtract the remainder* from the Modulus 10 to determine the check digit
* If the remainder is 0, then the check digit equals 0
Ex: 10-4=6 – the check digit is 6