Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Function CheckDigitEAN13(PN12 As String) As Integer Factor = 3 WeightedTotal = 0 For I = Len(PN12) To 1 Step -1 'Get the value of each number starting at the end CurrentCharNum = Mid(PN12, I, 1) 'Multiply by the weighting factor which is 3,1,3,1... 'and add the sum together WeightedTotal = WeightedTotal + CurrentCharNum * Factor 'Change factor for next calculation Factor = 4 - Factor Next I 'Find the CheckDigit by finding the number + WeightedTotal that = a multiple of 10 'Divide by 10, get the remainder and subtract from 10 I = (WeightedTotal Mod 10) If I <> 0 Then CheckDigit = (10 - I) Else CheckDigit = 0 End If CheckDigitEAN13 = CheckDigit End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|AS400 DB2 to MS SQL Server 2012||4||1,540|
|How would you as a DBA (DB2) answer this question?||9||97|
|Help with DB2 Create store procedure query||4||130|
|Authentication failing when using Powershell to connect to DB2 database||6||161|
Join the community of 500,000 technology professionals and ask your questions.