+ Reply to Thread
Results 1 to 2 of 2

Creating a Check Digit

  1. #1
    Ilan
    Guest

    Creating a Check Digit

    Please help!

    I'm trying to create a check digit using an existing string of 20 numbers.
    The calculation of this digit must follow this method
    1. All even numbers added together
    2. All odd numbers added together and multiplied by 3
    3. These two results need to be added together
    4. Take the last digit of the result in 3 and subtract 10 (The result needs
    to be a single check digit between 0 & 9)

    EG. 01248120470000003001, results in a check digit of 9

    There may be up to a million of these strings of numbers!

    My question is can this task be performed using one equation? I have split
    it up into sections to keep it simple for now, but I am stuck on section 4.

    Any help much appreciated...many thanks in advance

    Ilan

  2. #2
    Jerry W. Lewis
    Guest

    Re: Creating a Check Digit

    =MOD(SUM(IF(MOD(MID(string,ROW(A1:A20),1),2),3,1)*MID(string,ROW(A1:A20),1)),10)

    Array entered (Ctrl-Shift-Enter). I don't see what this has to do with
    charting.

    Jerry

    Ilan wrote:

    > Please help!
    >
    > I'm trying to create a check digit using an existing string of 20 numbers.
    > The calculation of this digit must follow this method
    > 1. All even numbers added together
    > 2. All odd numbers added together and multiplied by 3
    > 3. These two results need to be added together
    > 4. Take the last digit of the result in 3 and subtract 10 (The result needs
    > to be a single check digit between 0 & 9)
    >
    > EG. 01248120470000003001, results in a check digit of 9
    >
    > There may be up to a million of these strings of numbers!
    >
    > My question is can this task be performed using one equation? I have split
    > it up into sections to keep it simple for now, but I am stuck on section 4.
    >
    > Any help much appreciated...many thanks in advance
    >
    > Ilan



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1