Multiplying each number

Hi,

If you want to calculate checkdigit modulas 11 / weight 2,3,4,5,6,7 ,the following sample will help you

strNum = "5,544,332"
strNum = CInt(Double.Parse(strNum,System.Globalization.NumberStyles.Any)).ToString

then

arrResult = strNum.Reverse().Select(Function(c,i) CInt(c.toString)*(2+(i mod 6))).ToArray

check digit will be

11-(arrResult.Sum() mod 11)

Sample
Sample20240223-1.zip (4.1 KB)

Regards,