M
Mr. E.
working on project to generate numbers that contain valid check digit
based on the following:
user types a number in to a cell (right most digit is check digit and
is labeled position 1)
the check digit is generated this way:
Step (1) starting from position 2 (and working leftward), add the
values in the even numbered positions
Step (2) Multiply the result of step 1 by 3
Step (3) Starting from position 3, add up the values in the
odd-numbered positions, skipping position 1 because it's the location
of the check digit
Step (4) Add up the results for steps 2 and 3
Step (5) The check digit is the smallest number which, added to the
result in Step 4, gives a multiple of 10
Now, my problem is that I want to be able generate a list of 10 valid
numbers based on what the user inputs into a cell..
For example, user inputs "65432105"
(5 is the check digit: ((6+4+2+0)*3) + (5+3+1)) = 45 ; 45 + 5 = 50
which is mult of 10, so 5 is valid check digit)
I need to list 10 other sequential numbers with valid check digits:
example: 65432112, 65432129,...,65432204
Also the user can input any size number (I don't need to veriy the
check digit of the input number)
any help appreciated.
based on the following:
user types a number in to a cell (right most digit is check digit and
is labeled position 1)
the check digit is generated this way:
Step (1) starting from position 2 (and working leftward), add the
values in the even numbered positions
Step (2) Multiply the result of step 1 by 3
Step (3) Starting from position 3, add up the values in the
odd-numbered positions, skipping position 1 because it's the location
of the check digit
Step (4) Add up the results for steps 2 and 3
Step (5) The check digit is the smallest number which, added to the
result in Step 4, gives a multiple of 10
Now, my problem is that I want to be able generate a list of 10 valid
numbers based on what the user inputs into a cell..
For example, user inputs "65432105"
(5 is the check digit: ((6+4+2+0)*3) + (5+3+1)) = 45 ; 45 + 5 = 50
which is mult of 10, so 5 is valid check digit)
I need to list 10 other sequential numbers with valid check digits:
example: 65432112, 65432129,...,65432204
Also the user can input any size number (I don't need to veriy the
check digit of the input number)
any help appreciated.