The MOD-10 barcode option is used in IDAutomation Barcode Fonts, Components, and Applications to create a GS-1 Modulus-10 calculation, which is commonly used in UPC, EAN, GS1, DataBar and Interleaved 2 of 5 (ITF) barcodes.
When MOD-10 is utilized in a font encoder, the encoder returns a single MOD 10 check digit.
The following VBA code for use in Excel or Access is an example of calculating the GS1 MOD10 check digit:
MFactor = 3 WeightedTotal = 0 For I = Len(DataToEncode) To 1 Step -1 CurrentCharNum = Mid(DataToEncode, I, 1) WeightedTotal = WeightedTotal + (CurrentCharNum * MFactor) Factor = 4 - MFactor Next I I = (WeightedTotal Mod 10) If I <> 0 Then Mod10CheckDigit = (10 - I) Else Mod10CheckDigit = 0 End If