Can a MOD-10 Calculation Be Done in Excel?

kmeunier

New Member
Joined
Oct 2, 2006
Messages
24
I need to add a check digit to the end of a numeric short keyline using the MOD-10 calculation routine. Can this be done in Excel?

Thank you so much!

Kathy
 
I'm glad I was able to help.

Cheers
PGC
Hi PGC

I have followed your guidance above here to install the module and I can see how it works. Please would you be able to help with with changing the calculation and weighting so that it will work for my scenario? I am unsure how to change your code to fit:

Example code:
AAA0708501

Alpha Numeric Conversion
A – 1 K – 1 U – 1
B – 2 L – 2 V – 2
C – 3 M – 3 W – 3
D – 4 N – 4 X – 4
E – 5 O – 5 Y – 5
F – 6 P – 6 Z – 6
G – 7 Q – 7
H – 8 R – 8
I – 9 S – 9
J – 0 T – 0

AAA0708501 becomes 1110708501

Odd characters are weighted by 1, even digits
are weighted by 3
1 1 1 0 7 0 8 5 0 1
1 3 1 3 1 3 1 3 1 3 (weighting number)

digit is multiplied by its weighting
(1 x 1) (1 x 3) (1 x 1) (0 x 3) (7 x 1) (0 x 3) (8 x 1) (5 x 3) (0 x 1) (1 x 3)
= 1 3 1 0 7 0 8 15 0 3

1+3+1+0+7+0+8+15+0+3 = 38
38 % 10 = 8
10 - 8 = 2

2 is the check digit

AAA0708501(2)


Many thanks in advance for your help
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,215,432
Messages
6,124,856
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top