Skip to main content

Search

Search

Vb Script Required For Mod10 Check Digit Calculation

Comments

1 comment

  • Avatar
    Legacy Poster

    I had a go at it myself and it looks like it works but there is more than likely a cleaner way to do it.

     

    C1 = Mid((Data), 1, 1)* Mid((Weight), 1, 1)

    C2 = Mid((Data), 2, 1)* Mid((Weight), 2, 1)

    C3 = Mid((Data), 3, 1)* Mid((Weight), 3, 1)

    C4 = Mid((Data), 4, 1)* Mid((Weight), 4, 1)

    C5 = Mid((Data), 5, 1)* Mid((Weight), 5, 1)

    C6 = Mid((Data), 6, 1)* Mid((Weight), 6, 1)

    Total = C1 + C2 + C3 + C4 + C5 + C6

    Value = Right(Total, 1)

    0

Please sign in to leave a comment.